~/talk

Extending Extended Statistics to Joins

Talkat PGConf.dev 2026 · 2026-05-19..05-22· [databases]
links:none on file
slides:none on file

Proof-of-concept PostgreSQL patch extends CREATE STATISTICS to collect join-level MCV for two-way equality inner joins, adds STX_rowid/STX_keys_refs/STX_join_rows catalog fields, and implements index-probe sampling by sampling an anchor table and probing indexes on the other side. On the IMDB join-order benchmark (32 affected queries) cardinality estimates improve and total execution time drops about 1.3–1.5x with the slowest queries showing dramatic wins; ANALYZE cost rises ~200 ms. Current limits: anchor-table-triggered ANALYZE, requires an index, no composite-index probing yet.

AI-written summary · about

  1. 0:00Introduction to join statistics
  2. 1:06Problem with planner independence assumption
  3. 2:53Quantifying the problem scope
  4. 5:21Ongoing discussion on join stats
  5. 7:05Current syntax and catalog design
  6. 8:30Stats collection implementation
  7. 9:55Stats matching and predicate handling
  8. 10:59Benchmark results with join stats
  9. 12:25Alternative syntax and design choices
  10. 13:08Stats collection for unindexed joins
  11. 13:49Supporting N-way joins
  12. 14:09Query exploitation challenges
  13. 15:33Potential global plan impact
  14. 16:16Summary and next steps
~/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.