~/talk

Hacking the Query Planner, Again

Talkat PGCon 2020 · 2020-05-26..05-29· [databases]
links:none on file
slides:none on file

Explains exact planner actions: four phases (preprocess, scan/join plan, post-scan, postprocess) and concrete rewrites like ANY/EXISTS → semi-joins, inlining SQL functions, flattening subselects, and reducing outer joins to inner or anti-joins without using statistics. Shows how quals get distributed with equivalence classes and how join-order legality is enforced. Join search uses dynamic programming, falls back to genetic optimizer fallback past 12 relations, and honors a join-collapse limit (default 4); cost estimates drive choosing hash/merge/nested-loop and avoiding unnecessary final sorts.

AI-written summary · about

  1. 0:00Intro
  2. 0:46Overall backend structure
  3. 2:07Phases of planning
  4. 3:26Simplify scalar expressions
  5. 5:16Expand simple SQL functions in-line
  6. 11:41Reduce outer joins to anti joins
  7. 14:31Quals that are outerjoin-delayed
  8. 22:08Scan/join planning
  9. 24:19Join searching
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.