~/talk

Be Good Friends with Query Planner

Talkat PGConf India 2025 · 2025-03-05..03-07· [databases]
links:none on file
slides:none on file

Postgres tends to pick good plans but misestimates when stats are stale or cardinality grows with many joins; run ANALYZE after big updates and use Auto_explain log_analyze sparingly because it adds timing overhead (disable log_timing or use per-backend settings and sampling). For live inspection use PG show plans ~15% overhead or PG query_state (requires core changes); proposal targets an in-core per-node plan dump. Plan fixes: PG Hint Plan is case sensitive and fails if the hinted plan isn’t a candidate or GQO is active. Also proposed: EXPLAIN BUFFERS with storage I/O counts.

AI-written summary · about

  1. 0:00Introduction
  2. 1:18How planner works
  3. 5:16Why planner fails
  4. 7:05Monitoring execution plans
  5. 11:47Real-time plan inspection
  6. 15:23Analyzing execution plans
  7. 19:18Taking action to improve
  8. 24:06Summary and best practices
~/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.