RankPQO: Learning-to-Rank for Parametric Query Optimization
Parametric Query Optimization (PQO) is crucial for efficiently handling parametrized queries (PQ) in many database applications. This paper addresses two key challenges in existing PQO techniques, focusing on plan set generation and best plan selection. Regarding plan set generation, existing methods rely on modifying sub-plan cardinalities, often resulting in inefficiency and sub-optimal performance due to unclear extents of modifications needed. To overcome this issue, we propose a hybrid plan enumeration algorithm that adeptly adjusts both cardinality and join order. Regarding best plan selection, recent methods rely on machine learning models to choose plans with minimum predicted latency, but they struggle with accurate predictions when parameter bindings vary. Even minor variations in parameters can significantly impact cardinality, affecting plan optimality. To overcome this issue, we propose to utilize a learning-to-rank model, which uses relative rankings as a more reliable performance indicator. Our approach, integrated into PostgreSQL, undergoes extensive experiments on real datasets, showcasing significant improvements in both efficiency and accuracy, as compared to baselines. Specifically, it accelerates the PostgreSQL optimizer by up to 2.57× and surpasses the best existing baseline by up to 1.36×.
Authors
- Gao Cong (ORCID: https://orcid.org/0000-0002-4430-6373)
- Songsong Mo (ORCID: https://orcid.org/0000-0003-0011-0640)
- Quanqing Xu (ORCID: https://orcid.org/0000-0001-8989-9662)
- Zhifeng Bao (ORCID: https://orcid.org/0000-0003-2477-381X)
- Chuanhui Yang (ORCID: https://orcid.org/0009-0009-3530-6476)
- Yue Zhao (ORCID: https://orcid.org/0009-0000-7161-1421)
Institutions
- Nanyang Technological University (SG)
- RMIT University (AU)
Publication Details
- Journal
- Proceedings of the VLDB Endowment
- Published
- 2024-11-01
- DOI
- https://doi.org/10.14778/3712221.3712248
- Citations
- 2
- Primary Topic
- Advanced Database Systems and Queries
- Type
- article
- Field-Weighted Citation Impact
- 0.70