APQO: An Adaptive Framework for Parametric Query Optimization
Sijia Li, Peng Cai, Zhifan Zhang, Huiqi Hu, Rong Zhang, Xuan Zhou, Quanqing Xu, Chuanhui Yang
Abstract
Previous learning-based parameter query optimization (PQO) methods excel in static workloads by precisely selecting optimal plans in a cache with a fixed set of representative plans. However, these methods struggle in dynamic workloads because they cannot predict over dynamically changed plan caches. These queries that fall outside the previously observed query parameter distribution have the risk of reusing suboptimal plans. Unlike traditional PQO methods that learn mappings from parametric query parameters to a fixed set of execution plans, our adaptive PQO framework ( APQO ) takes both query parameters and the plans themselves as model inputs, thereby handling variable numbers of plans in dynamic workloads. By embedding plan representations through representation learning, we pre-train a foundation model offline, enabling APQO to acquire a generalizable plan performance prediction model. Leveraging the foundation model's predictive capability along with a hybrid data augmentation strategy, we train an online calibration model with minimal training data for distribution-shifted new queries, rapidly adapting knowledge for reusing new plans. APQO is natively designed to handle the characteristics of dynamic workloads. Experimental results show that APQO outperforms existing PQO methods in dynamic workloads, achieving a higher cache hit ratio and significantly reducing query latency.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Cited by top-tier papers1
Ask how each one uses itRelated papers
- Leveraging Query Logs and Machine Learning for Parametric Query OptimizationKapil Vaidya, Anshuman Dutt, Vivek R. Narasayya, Surajit ChaudhuriVLDB 2022 · 20 citations
- Practical Parameterized Query Optimization via Efficient Plan Reuse and List-wise RankingHai Lan, Yang Yu, Zhifeng Bao, Zi Huang et al.SIGMOD 2026
- Lequa: A Learning-Based Query-Aware Framework for Selective Query OptimizationGuoneng Li, Pengfei Zheng, Ling Xu, Yan Li et al.ICDE 2026
- RankPQO: Learning-to-Rank for Parametric Query OptimizationSongsong Mo, Yue Zhao, Zhifeng Bao, Quanqing Xu et al.VLDB 2025 · 3 citations
- LIMAO: A Framework for Lifelong Modular Learned Query OptimizationQihan Zhang, Shaolin Xie, Ibrahim SabekVLDB 2025 · 4 citations
