~/talk

Explaining the Postgres Query Optimizer

Talkat HighLoad++ 2012 · 2012-10-22..10-23· [databases]
slides:none on file

Shows how PostgreSQL chooses sequential scan, bitmap heap scan, or index scan using table statistics gathered by ANALYZE/auto‑vacuum and demonstrated with temporary tables (199–260 rows, 78% of rows sharing one value). Uses EXPLAIN/ANALYZE and simple functions to prove that when a value is common the planner picks sequential or bitmap scans, when rare it picks index scans, and that turning off the optimizer makes estimated cost go from 8 to 39, drastically slowing queries.

AI-written summary · about

  1. 0:00Introduction
  2. 2:27Query optimizer role
  3. 5:33Data scanning methods
  4. 16:14Statistics and optimization
  5. 19:19Cost of operations
  6. 22:14Join methods
  7. 28:43Constraints and performance
  8. 31:49Heuristics and accuracy
  9. 33:00Optimizer evolution
  10. 34:50Q&A
~/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.