Affiliation:
1. Simon Fraser University
2. Tencent Inc
Abstract
Cardinality estimation is a fundamental but long unresolved problem in query optimization. Recently, multiple papers from different research groups consistently report that learned models have the potential to replace existing cardinality estimators. In this paper, we ask a forward-thinking question:
Are we ready to deploy these learned cardinality models in production?
Our study consists of three main parts. Firstly, we focus on the static environment (i.e., no data updates) and compare five new learned methods with nine traditional methods on four real-world datasets under a unified workload setting. The results show that learned models are indeed more accurate than traditional methods, but they often suffer from high training and inference costs. Secondly, we explore whether these learned models are ready for dynamic environments (i.e., frequent data updates). We find that they cannot catch up with fast data updates and return large errors for different reasons. For less frequent updates, they can perform better but there is no clear winner among themselves. Thirdly, we take a deeper look into learned models and explore when they may go wrong. Our results show that the performance of learned methods can be greatly affected by the changes in correlation, skewness, or domain size. More importantly, their behaviors are much harder to interpret and often unpredictable. Based on these findings, we identify two promising research directions (control the cost of learned models and make learned models trustworthy) and suggest a number of research opportunities. We hope that our study can guide researchers and practitioners to work together to eventually push learned cardinality estimators into real database systems.
Subject
General Earth and Planetary Sciences,Water Science and Technology,Geography, Planning and Development
Cited by
54 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Learned Query Optimizer: What is New and What is Next;Companion of the 2024 International Conference on Management of Data;2024-06-09
2. QardEst: Using Quantum Machine Learning for Cardinality Estimation of Join Queries;Workshop on Quantum Computing and Quantum-Inspired Technology for Data-Intensive Systems and Applications;2024-06-09
3. DACE: A Database-Agnostic Cost Estimator;2024 IEEE 40th International Conference on Data Engineering (ICDE);2024-05-13
4. Duet: Efficient and Scalable Hybrid Neural Relation Understanding;2024 IEEE 40th International Conference on Data Engineering (ICDE);2024-05-13
5. Lero: applying learning-to-rank in query optimizer;The VLDB Journal;2024-04-25