Cardinality Estimation in DBMS: A Comprehensive Benchmark Evaluation
Yuxing Han, Ziniu Wu, Peizhi Wu, Rong Zhu, Jingyi Yang, Liang Wei Tan, Kai Zeng, Gao Cong, Yanzhao Qin, Andreas Pfadler, Zhengping Qian, Jingren Zhou
Abstract
Cardinality estimation (CardEst) plays a significant role in generating high-quality query plans for a query optimizer in DBMS. In the last decade, an increasing number of advanced CardEst methods (especially ML-based) have been proposed with outstanding estimation accuracy and inference latency. However, there exists no study that systematically evaluates the quality of these methods and answer the fundamental problem: to what extent can these methods improve the performance of query optimizer in real-world settings, which is the ultimate goal of a CardEst method. In this paper, we comprehensively and systematically compare the effectiveness of CardEst methods in a real DBMS. We establish a new benchmark for CardEst, which contains a new complex real-world dataset STATS and a diverse query workload STATS-CEB. We integrate multiple most representative CardEst methods into an open-source database system PostgreSQL, and comprehensively evaluate their true effectiveness in improving query plan quality, and other important aspects affecting their applicability, ranging from inference latency, model size, and training time, to update efficiency and accuracy. We obtain a number of key findings for the CardEst methods, under different data and query settings. Furthermore, we find that the widely used estimation accuracy metric (Q-Error) cannot distinguish the importance of different sub-plan queries during query optimization and thus cannot truly reflect the query plan quality generated by CardEst methods. Therefore, we propose a new metric P-Error to evaluate the performance of CardEst methods, which overcomes the limitation of Q-Error and is able to reflect the overall end-to-end performance of CardEst methods. We have made all of the benchmark data and evaluation code publicly available at h ps://github.com/Nathaniel-Han/End-to-End-CardEst-Benchmark.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
54 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Lero: A Learning-to-Rank Query Optimizer cites Are We Ready For Learned Cardinality Estimation?
- Lero: A Learning-to-Rank Query Optimizer cites DeepDB: Learn from Data, not from Queries!
- Lero: A Learning-to-Rank Query Optimizer cites FLAT: Fast, Lightweight and Accurate Method for Cardinality Estimation
- Lero: A Learning-to-Rank Query Optimizer cites An End-to-End Learning-based Cost Estimator
- Lero: A Learning-to-Rank Query Optimizer cites NeuroCard: One Cardinality Estimator for All Tables
- Robust Query Driven Cardinality Estimation under Changing Workloads cites Are We Ready For Learned Cardinality Estimation?
- Robust Query Driven Cardinality Estimation under Changing Workloads cites DeepDB: Learn from Data, not from Queries!
- Robust Query Driven Cardinality Estimation under Changing Workloads cites FLAT: Fast, Lightweight and Accurate Method for Cardinality Estimation
- Robust Query Driven Cardinality Estimation under Changing Workloads cites NeuroCard: One Cardinality Estimator for All Tables
- Are We Ready For Learned Cardinality Estimation? cites An End-to-End Learning-based Cost Estimator
- Are We Ready For Learned Cardinality Estimation? cites NeuroCard: One Cardinality Estimator for All Tables
- DeepDB: Learn from Data, not from Queries! cites An End-to-End Learning-based Cost Estimator
- FLAT: Fast, Lightweight and Accurate Method for Cardinality Estimation cites Are We Ready For Learned Cardinality Estimation?
- FLAT: Fast, Lightweight and Accurate Method for Cardinality Estimation cites DeepDB: Learn from Data, not from Queries!
- FLAT: Fast, Lightweight and Accurate Method for Cardinality Estimation cites NeuroCard: One Cardinality Estimator for All Tables
- LEON: A New Framework for ML-Aided Query Optimization cites FLAT: Fast, Lightweight and Accurate Method for Cardinality Estimation
- LEON: A New Framework for ML-Aided Query Optimization cites An End-to-End Learning-based Cost Estimator
- LEON: A New Framework for ML-Aided Query Optimization cites NeuroCard: One Cardinality Estimator for All Tables
- NeuroCard: One Cardinality Estimator for All Tables cites An End-to-End Learning-based Cost Estimator
- Kepler: Robust Learning for Parametric Query Optimization cites Are We Ready For Learned Cardinality Estimation?
- Kepler: Robust Learning for Parametric Query Optimization cites NeuroCard: One Cardinality Estimator for All Tables
Cited by top-tier papers54
- Lero: A Learning-to-Rank Query OptimizerRong Zhu, Wei Chen, Bolin Ding, Xingguang Chen et al.VLDB 2023 · 102 citations
- Robust Query Driven Cardinality Estimation under Changing WorkloadsParimarjan Negi, Ziniu Wu, Andreas Kipf, Nesime Tatbul et al.VLDB 2023 · 88 citations
- LEON: A New Framework for ML-Aided Query OptimizationXu Chen, Haitian Chen, Zibo Liang, Shuncheng Liu et al.VLDB 2023 · 52 citations
- Opportunities for Quantum Acceleration of Databases: Optimization of Queries and Transaction SchedulesUmut Çalikyilmaz, Sven Groppe, Jinghua Groppe, Tobias Winker et al.VLDB 2023 · 38 citations
- Kepler: Robust Learning for Parametric Query OptimizationLyric Doshi, Vincent Zhuang, Gaurav Jain, Ryan Marcus et al.SIGMOD 2023 · 35 citations
Builds on13
- An End-to-End Learning-based Cost EstimatorJi Sun, Guoliang LiVLDB 2020 · 251 citations
- Are We Ready For Learned Cardinality Estimation?Xiaoying Wang, Changbo Qu, Weiyuan Wu, Jiannan Wang et al.VLDB 2021 · 156 citations
- DeepDB: Learn from Data, not from Queries!Benjamin Hilprecht, Andreas Schmidt, Moritz Kulessa, Alejandro Molina et al.VLDB 2020 · 154 citations
- NeuroCard: One Cardinality Estimator for All TablesZongheng Yang, Amog Kamsetty, Sifei Luan, Eric Liang et al.VLDB 2021 · 138 citations
- FLAT: Fast, Lightweight and Accurate Method for Cardinality EstimationRong Zhu, Ziniu Wu, Yuxing Han, Kai Zeng et al.VLDB 2021 · 120 citations
Related papers
- Flow-Loss: Learning Cardinality Estimates That MatterParimarjan Negi, Ryan Marcus, Andreas Kipf, Hongzi Mao et al.VLDB 2021 · 102 citations
- PRICE: A Pretrained Model for Cross-Database Cardinality EstimationTianjing Zeng, Junwei Lan, Jiahong Ma, Wenqing Wei et al.VLDB 2025 · 14 citations
- Speeding Up End-to-end Query Execution via Learning-based Progressive Cardinality EstimationFang Wang, Xiao Yan, Man Lung Yiu, Shuai Li et al.SIGMOD 2023 · 24 citations
- LpBound: Pessimistic Cardinality Estimation Using ℓp-Norms of Degree SequencesHaozhe Zhang, Christoph Mayer, Mahmoud Abo Khamis, Dan Olteanu et al.SIGMOD 2025 · 7 citations
- FACE: A Normalizing Flow based Cardinality EstimatorJiayi Wang, Chengliang Chai, Jiabin Liu, Guoliang LiVLDB 2022
