MQPHFM: A SQL Query Featurization Method Suitable for Cardinality Estimation Tasks
The deep learning-based cardinality estimation is a hot research topic in the field of database query optimization. The SQL query featurization has a direct impact on the quality of cardinality estimation models and has received widespread attention. There are significant shortcomings in the existing SQL query featurization method. (1) Existing methods typically only consider physical query plans and ignore the semantic information of logical query plans, thus leading to information loss. (2) Existing methods often use random sampling to estimate the data distribution, which can easily introduce bias, leading to cardinality estimation that does not match the actual data distribution, even facing the 0-tuple problem, which increases the challenge of model training. This paper proposes a novel SQL query featurization method, MQPHFM, to address the above problems. The method combines physical query plans and logical query plans to fully understand the semantic features of SQL, enabling the model to obtain both the execution details and semantic logic of the SQL query at the same time. Meanwhile, histograms are used as data distribution estimation tools to fully capture the possible logical relationships between columns, thereby improving the accuracy and robustness of cardinality estimation model. Experimental results on the IMDb dataset show that the proposed method can effectively improve the accuracy of cardinality estimation model.
Authors
- Jun Tie (ORCID: https://orcid.org/0000-0002-0259-2447)
- Yue Hu (ORCID: https://orcid.org/0009-0006-7368-1494)
- Shipeng Cao
- Lifeng Wu (ORCID: https://orcid.org/0000-0002-1210-5411)
- Bowen Zhang (ORCID: https://orcid.org/0000-0003-1184-8587)
- Chong Sun (ORCID: https://orcid.org/0000-0001-8915-0969)
- Chongwei Ruan
- Hantao Ya
Institutions
- Minzu University of China (CN)
- Genertec Shenyang Machine Tool Co., Ltd. (China) (CN)
Publication Details
- Published
- 2024-10-11
- DOI
- https://doi.org/10.1109/icebe62490.2024.00020
- Primary Topic
- Advanced Database Systems and Queries
- Type
- article
- Field-Weighted Citation Impact
- 0.00