22-25 April 2026

PostgreSQL for the SQL Server DBA - Cardinality Estimation

Proposed session for SQLBits 2026

TL; DR

This session helps SQL Server professionals learn how PostgreSQL works by using familiar optimizer concepts. It explores PostgreSQL cardinality estimation, statistics, and query planning, highlighting key similarities and differences to build intuition and improve performance tuning.

Session Details

Cardinality estimation, the process of predicting the number of rows a query will return, plays a pivotal role in query optimization, directly impacting the performance of database workloads. This session dives into PostgreSQL's approach to cardinality estimation, unraveling the mechanics behind statistics collection, selectivity calculations, and query planning. Tailored for SQL Server professionals, the talk bridges the gap by contrasting PostgreSQL's methods with SQL Server's optimizer strategies. Attendees will learn how to improve execution plans by understanding how the database engine generates its estimates and makes optimization decisions. Whether you're managing simple queries or optimizing complex workloads, this session equips you with the knowledge to navigate PostgreSQL's powerful statistics and estimation framework effectively.

3 things you'll get out of this session

Understand how PostgreSQL’s cardinality estimation and statistics work by mapping them to familiar SQL Server optimizer concepts Learn why PostgreSQL chooses specific execution plans and how estimation errors impact performance Gain practical insight into tuning queries by aligning statistics, selectivity, and planner behavior with workload patterns