- Postico client for mac
- pgcli - Postgres CLI with autocompletion and syntax highlighting
- pghero - Server and query performance dashboard
- PEV - Query planning / Explain analyze visualisation
- PostgreSQL's explain analyze made readable
| SELECT | |
| now()-pg_postmaster_start_time() "Uptime", now()-stats_reset "Since stats reset", | |
| round(100.0*checkpoints_req/total_checkpoints,1) "Forced checkpoint ratio (%)", | |
| round(np.min_since_reset/total_checkpoints,2) "Minutes between checkpoints", | |
| round(checkpoint_write_time::numeric/(total_checkpoints*1000),2) "Average write time per checkpoint (s)", | |
| round(checkpoint_sync_time::numeric/(total_checkpoints*1000),2) "Average sync time per checkpoint (s)", | |
| round(total_buffers/np.mp,1) "Total MB written", | |
| round(buffers_checkpoint/(np.mp*total_checkpoints),2) "MB per checkpoint", | |
| round(buffers_checkpoint/(np.mp*np.min_since_reset*60),2) "Checkpoint MBps", | |
| round(buffers_clean/(np.mp*np.min_since_reset*60),2) "Bgwriter MBps", |
| -- In pg_stat_statements, there is a problem: sometimes (quite often), it registers the same query twice (or even more). | |
| -- It's easy to check in your DB: | |
| -- | |
| -- with heh as ( | |
| -- select userid, dbid, query, count(*), array_agg(queryid) queryids | |
| -- from pg_stat_statements group by 1, 2, 3 having count(*) > 1 | |
| -- ) select left(query, 85) || '...', userid, dbid, count, queryids from heh; | |
| -- | |
| -- This query gives you "full picture", aggregating stats for each query-database-username ternary |
Недостаточно просто описать задачу в тезисах. Довольно часто бывает так, что заинтересованные слушатели могут это сделать не хуже докладчика. Хорошие же тезисы отличает конкретика: конкретные названия, конкретные числовые показатели (последнее особенно важно для Highload++).
Главное — приоткрыть суть вашего доклада, оставаясь при этом в рамках сжатых тезисов.
И это не так сложно. При подготовке доклада и его тезисов нужно сделать всего лишь три шага.
| WITH table_scans as ( | |
| SELECT relid, | |
| tables.idx_scan + tables.seq_scan as all_scans, | |
| ( tables.n_tup_ins + tables.n_tup_upd + tables.n_tup_del ) as writes, | |
| pg_relation_size(relid) as table_size | |
| FROM pg_stat_user_tables as tables | |
| ), | |
| all_writes as ( | |
| SELECT sum(writes) as total_writes | |
| FROM table_scans |
| ----- Esc ----- | |
| Quick change directory: Esc + c | |
| Quick change directory history: Esc + c and then Esc + h | |
| Quick change directory previous entry: Esc + c and then Esc + p | |
| Command line history: Esc + h | |
| Command line previous command: Esc + p | |
| View change: Esc + t (each time you do this shortcut a new directory view will appear) | |
| Print current working directory in command line: Esc + a | |
| Switch between background command line and MC: Ctrl + o | |
| Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name |
| moved to github --> https://github.com/bill-auger/git-branch-status/ |