~/talk

Improving PostgreSQL Join Estimates Statistics and Beyond

Talkat Percona Live 2026 Bay Area · 2026-05-27..05-29· [databases]
links:none on file
slides:none on file

Proposal implements cross-table join statistics in Postgres by extending CREATE STATISTICS ... FROM ... JOIN to collect multi-table MCV lists for equal inner joins, using an index-based sampling probe algorithm to avoid full sample joins. Experiments on the Join Order Benchmark show Q-error reduced and overall runs speed up about 1.5–1.7× with some slow queries dropping dramatically; analyze cost rises ~200 ms. Current limits: equality joins only, single join-condition implemented, targets Postgres 20; future work covers distinct counts, FDs, view-style stats, and runtime adaptation.

AI-written summary · about

  1. 0:00Join estimate challenges
  2. 1:08Cardinality estimation matters
  3. 2:32Extended stats limitations
  4. 3:58Join Order Benchmark findings
  5. 4:40Row count underestimation impact
  6. 5:47Fix with join statistics
  7. 6:50Syntax for join statistics
  8. 8:15Testing with join stats
  9. 9:20Execution time improvements
  10. 10:04Overhead and analyze
  11. 10:26Design challenges
  12. 11:32Statistics collection
  13. 12:59Row containment
  14. 14:01Beyond join stats
  15. 14:42Learned optimization
  16. 15:45Runtime adaptation
  17. 17:10Improvement directions
  18. 18:14Q&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.