Improving PostgreSQL Join Estimates: Statistics and Beyond

May 27-29, 2026 • Computer History Museum, CaliforniaDate, time, and room will be announced soon.
PostgreSQL’s query planner relies heavily on cardinality estimation to choose efficient execution plans. When join estimates are wrong, the planner can select dramatically suboptimal plans, leading to slow queries and unstable performance.
This session examines how PostgreSQL estimates join selectivity today and why those estimates often fail. After briefly reviewing extended statistics and their role in improving estimates within a single table, we explore extending these ideas to joins through join statistics.
Topics include:
• Why join estimates break down, particularly under independence assumptions
• How PostgreSQL’s extended statistics (MCV lists, dependencies, and N-distinct) improve estimation
• A prototype implementation of join statistics and the design choices behind it
• Benchmark results showing how improved estimates affect planner decisions and performance
• Alternative approaches and future directions for improving join estimation in PostgreSQL
Speaker

Alex Wang is a software engineer at EnterpriseDB and a contributor to the PostgreSQL open source project. Her current work focuses on query planner improvements, statistics, and all things database internals.

