Cardinality estimation in DBMS

Author:

Han Yuxing1,Wu Ziniu1,Wu Peizhi2,Zhu Rong1,Yang Jingyi2,Tan Liang Wei2,Zeng Kai1,Cong Gao2,Qin Yanzhao3,Pfadler Andreas1,Qian Zhengping1,Zhou Jingren1,Li Jiangneng1,Cui Bin4

Affiliation:

1. Alibaba Group

2. Nanyang Technological University

3. Alibaba Group and Peking University

4. Peking University

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 DBMS PostgreSQL, and comprehensively evaluate their true effectiveness in improving query plan quality, and other important aspects affecting their applicability. We obtain a number of key findings 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 generated query plan quality. 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. It could serve as a better optimization objective for future CardEst methods.

Publisher

Association for Computing Machinery (ACM)

Subject

General Earth and Planetary Sciences,Water Science and Technology,Geography, Planning and Development

Reference75 articles.

1. Nicolas Bruno Surajit Chaudhuri and Luis Gravano. 2001. STHoles: a multidimensional workload-aware histogram. In SIGMOD. 211--222. Nicolas Bruno Surajit Chaudhuri and Luis Gravano. 2001. STHoles: a multidimensional workload-aware histogram. In SIGMOD. 211--222.

2. Walter Cai . 2021. Github repository: pqo-open source. https://github.com/waltercai ( 2021 ). Walter Cai. 2021. Github repository: pqo-open source. https://github.com/waltercai (2021).

3. Walter Cai Magdalena Balazinska and Dan Suciu. 2019. Pessimistic cardinality estimation: Tighter upper bounds for intermediate join cardinalities. In SIGMOD. 18--35. Walter Cai Magdalena Balazinska and Dan Suciu. 2019. Pessimistic cardinality estimation: Tighter upper bounds for intermediate join cardinalities. In SIGMOD. 18--35.

4. Exact cardinality query optimization for optimizer testing

5. XGBoost

Cited by 36 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Advances in Machine Learning for Wearable Sensors;ACS Nano;2024-08-15

2. Blueprinting the Cloud: Unifying and Automatically Optimizing Cloud Data Infrastructures with BRAD;Proceedings of the VLDB Endowment;2024-07

3. Learned Query Optimizer: What is New and What is Next;Companion of the 2024 International Conference on Management of Data;2024-06-09

4. Stage: Query Execution Time Prediction in Amazon Redshift;Companion of the 2024 International Conference on Management of Data;2024-06-09

5. ByteCard: Enhancing ByteDance's Data Warehouse with Learned Cardinality Estimation;Companion of the 2024 International Conference on Management of Data;2024-06-09

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3