A Comparative Study and Component Analysis of Query Plan Representation Techniques in ML4DB Studies
Yue Zhao, Zhaodonghui Li, Gao Cong
Abstract
Query plan is widely used as input in machine learning for databases (ML4DB) research, with query plan representation as a critical step. However, existing studies typically focus on one task, and propose a novel design to represent query plans along with a ML4DB framework, without comparing with other representation methods designed for a different task. This raises a critical question: How do we select a query plan representation method in a ML4DB system? To address this question, we perform a comparative study on ten representation methods on three distinct ML4DB tasks: cost estimation, index selection and query optimization. Our extensive experiments not only verify the interchangeability of representation methods across different tasks, but also identify consistently high-performing models. Further, we dissect the query plan representation into two core components: feature encoding and tree model, and evaluate the impact of design choices for each in different scenarios. Our results show that the findings for tasks optimizing absolute errors are different from findings for tasks optimizing relative errors. Some findings challenge widely-held assumptions, i.e., one finding shows that tree models do not significantly impact cost estimation results, but only play a significant role to optimize relative performance. Practical guidelines and future directions are provided based on the findings of the study.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers9
- LLM-R2: A Large Language Model Enhanced Rule-based Rewrite System for Boosting Query EfficiencyZhaodonghui Li, Haitao Yuan, Huiming Wang, Gao Cong et al.VLDB 2025 · 52 citations
- How Good are Learned Cost Models, Really? Insights from Query Optimization TasksRoman Heinrich, Manisha Luthra, Johannes Wehrstein, Harald Kornmayer et al.SIGMOD 2025 · 13 citations
- Hit the Gym: Accelerating Query Execution to Efficiently Bootstrap Behavior Models for Self-Driving Database Management SystemsWan Shen Lim, Lin Ma, William Zhang, Matthew Butrovich et al.VLDB 2024 · 10 citations
- LEAP: A Low-cost Spark SQL Query Optimizer using Pairwise ComparisonJunhao Ye, Jiahui Li, Lu Chen, Yuren Mao et al.VLDB 2025 · 2 citations
- PlanRGCN: Predicting SPARQL Query PerformanceAbiram Mohanaraj, Matteo Lissandrini, Katja HoseVLDB 2025 · 2 citations
Builds on12
- An End-to-End Learning-based Cost EstimatorJi Sun, Guoliang LiVLDB 2020 · 251 citations
- Bao: Making Learned Query Optimization PracticalRyan Marcus, Parimarjan Negi, Hongzi Mao, Nesime Tatbul et al.SIGMOD 2021 · 242 citations
- Reinforcement Learning with Tree-LSTM for Join Order SelectionXiang Yu, Guoliang Li, Chengliang Chai, Nan TangICDE 2020 · 168 citations
- Are We Ready For Learned Cardinality Estimation?Xiaoying Wang, Changbo Qu, Weiyuan Wu, Jiannan Wang et al.VLDB 2021 · 156 citations
- QueryFormer: A Tree Transformer Model for Query Plan RepresentationYue Zhao, Gao Cong, Jiachen Shi, Chunyan MiaoVLDB 2022 · 117 citations
Related papers
- TATA: An Efficient Framework for Task Transfer in Query Plan RepresentationYue Zhao, Songsong Mo, Gao CongVLDB 2026
- Reqo: A Comprehensive Learning-Based Cost Model for Robust and Explainable Query OptimizationBaoming Chang, Amin Kamali, Verena KantereSIGMOD 2026 · 1 citation
- T3: Accurate and Fast Performance Prediction for Relational Database Systems With Compiled Decision TreesMaximilian Rieger, Thomas NeumannSIGMOD 2025 · 5 citations
- Towards a Unified Query Plan RepresentationJinsheng Ba, Manuel RiggerICDE 2025
- Robust Plan Evaluation based on Approximate Probabilistic Machine LearningAmin Kamali, Verena Kantere, Calisto Zuzarte, Vincent CorvinelliVLDB 2025 · 1 citation
