~/talk

PostgreSQL Query Performance Insights

Talkat PGConf NYC 2021 · 2021-12-02..12-03· [databases, observability]
slides:none on file

Explains how to use pg_stat_activity, pg_stat_statements, auto_explain, pgBadger, and pg_stat_monitor to get real signals: pg_stat_statements adds 3–4% overhead and defaults to 5000 queries retained; auto_explain forces plans into logs; pgBadger parses huge logs (author created a 4GB log in 15 minutes at ~5000 TPS); pg_stat_activity is ephemeral; pg_stat_monitor implements per-minute buckets and stores actual parameter values plus histograms and is moving from RC to GA.

AI-written summary · about

  1. 0:00Start
  2. 1:39Presentation Outline
  3. 5:34Components of Query Processing
  4. 9:03EXPLAIN - Basics: Costs
  5. 16:23EXPLAIN ANALYZE - Basics
  6. 31:15pg_stat_statements - Challenges
  7. 36:03auto_explain Extension
  8. 42:00pgbadger Challenges
  9. 47:33Tools for the Use Case
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.