BayesCard: Revitilizing Bayesian Frameworks for Cardinality Estimation
Not on the map. Why?
Abstract (arXiv)
Cardinality estimation (CardEst) is an essential component in query optimizers and a fundamental problem in DBMS. A desired CardEst method should attain good algorithm performance, be stable to varied data settings, and be friendly to system deployment. However, no existing CardEst method can fulfill the three criteria at the same time. Traditional methods often have significant algorithm drawbacks such as large estimation errors. Recently proposed deep learning based methods largely improve the estimation accuracy but their performance can be greatly affected by data and often difficult for system deployment. In this paper, we revitalize the Bayesian networks (BN) for CardEst by incorporating the techniques of probabilistic programming languages. We present BayesCard, the first framework that inherits the advantages of BNs, i.e., high estimation accuracy and interpretability, while overcomes their drawbacks, i.e. low structure learning and inference efficiency. This makes BayesCard a perfect candidate for commercial DBMS deployment. Our experimental results on several single-table and multi-table benchmarks indicate BayesCard's superiority over existing state-of-the-art CardEst methods: BayesCard achieves comparable or better accuracy, 1-2 orders of magnitude faster inference time, 1-3 orders faster training time, 1-3 orders smaller model size, and 1-2 orders faster updates. Meanwhile, BayesCard keeps stable performance when varying data with different settings. We also deploy BayesCard into PostgreSQL. On the IMDB benchmark workload, it improves the end-to-end query time by 13.3%, which is very close to the optimal result of 14.2% using an oracle of true cardinality.
Key facts. Cited by 10 papers in the map (data through 7 Oct 2026). First posted on arXiv 29 Dec 2020.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 4; 2022: 0; 2023: 1; 2024: 1; 2025: 3; 2026: 1.
10 papers.
- 2021Cardinality Estimation in DBMS: A Comprehensive Benchmark Evaluationcited by 30
- 2023Lero: A Learning-to-Rank Query Optimizercited by 26
- 2021A Unified Transferable Model for ML-Enhanced DBMScited by 10
- 2024PRICE: A Pretrained Model for Cross-Database Cardinality Estimationcited by 8
- 2021Glue: Adaptively Merging Single Table Cardinality to Estimate Join Query Sizecited by 2
- 2021Baihe: SysML Framework for AI-driven Databasescited by 0
- 2025Optimize Cardinality Estimation Model Pretraining by Simplifying the Training Datasetscited by 0
- 2025Sketched Sum-Product Networks for Joinscited by 0
- 2025ZeroCard: Cardinality Estimation with Zero Dependence on Target Databases -- No Data, No Query, No Retrainingcited by 0
- 2026MICRO: A Lightweight Middleware for Optimizing Cross-store Cross-model Graph-Relation Joins [Technical Report]cited by 0
- 2026MICRO: A Lightweight Middleware for Optimizing Cross-store Cross-model Graph-Relation Joins [Technical Report]14 Mar 2026
- 2025ZeroCard: Cardinality Estimation with Zero Dependence on Target Databases -- No Data, No Query, No Retraining9 Oct 2025
- 2025Sketched Sum-Product Networks for Joins16 Jun 2025
- 2025Optimize Cardinality Estimation Model Pretraining by Simplifying the Training Datasets20 Feb 2025
- 2024PRICE: A Pretrained Model for Cross-Database Cardinality Estimation3 Jun 2024
- 2023Lero: A Learning-to-Rank Query Optimizer14 Feb 2023
- 2021Baihe: SysML Framework for AI-driven Databases29 Dec 2021
- 2021Glue: Adaptively Merging Single Table Cardinality to Estimate Join Query Size7 Dec 2021
- 2021Cardinality Estimation in DBMS: A Comprehensive Benchmark Evaluation13 Sep 2021
- 2021A Unified Transferable Model for ML-Enhanced DBMS6 May 2021