LIMAO: A Framework for Lifelong Modular Learned Query Optimization
Qihan Zhang, Shaolin Xie, Ibrahim Sabek
Abstract
Query optimizers are crucial for the performance of database systems. Recently, many learned query optimizers (LQOs) have demonstrated significant performance improvements over traditional optimizers. However, most of them operate under a limited assumption: a static query environment. This limitation prevents them from effectively handling complex, dynamic query environments in real-world scenarios. Extensive retraining can lead to the well-known catastrophic forgetting problem which reduces the LQO generalizability over time. In this paper, we address this limitation and introduce LIMAO (Lifelong Modular Learned Query Optimizer), a framework for lifelong learning of plan cost prediction that can be seamlessly integrated into existing LQOs. LIMAO leverages a modular lifelong learning technique, an attention-based neural network composition architecture, and an efficient training paradigm designed to retain prior knowledge while continuously adapting to new environments. We implement LIMAO in two LQOs, showing that our approach is agnostic to underlying engines. Experimental results show that LIMAO significantly enhances the performance of LQOs, achieving up to a 40% improvement in query execution time and reducing the variance of execution time by up to 60% under dynamic workloads. By leveraging a precise and self-consistent design, LIMAO effectively mitigates catastrophic forgetting, ensuring stable and reliable plan quality over time. Compared to Postgres, LIMAO achieves up to a 4× speedup on selected benchmarks, highlighting its practical advantages in real-world query optimization.
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.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 2facadde-1542-419b-9a13-392d64405849Cited by top-tier papers1
Ask how each one uses itBuilds on29
- Recurrent Independent MechanismsAnirudh Goyal, Alex Lamb, Jordan Hoffmann, Shagun Sodhani et al.ICLR 2021 · 357 citations
- ALEX: An Updatable Adaptive Learned IndexJialin Ding, Umar Farooq Minhas, Jia Yu, Chi Wang et al.SIGMOD 2020 · 274 citations
- An End-to-End Learning-based Cost EstimatorJi Sun, Guoliang LiVLDB 2020 · 251 citations
- Multi-Task Reinforcement Learning with Soft ModularizationRuihan Yang, Huazhe Xu, Yi Wu, Xiaolong WangNeurIPS 2020 · 247 citations
- Bao: Making Learned Query Optimization PracticalRyan Marcus, Parimarjan Negi, Hongzi Mao, Nesime Tatbul et al.SIGMOD 2021 · 242 citations
Related papers
- SEFRQO: A Self-Evolving Fine-Tuned RAG-Based Query OptimizerHanwen Liu, Qihan Zhang, Ryan Marcus, Ibrahim SabekSIGMOD 2026 · 2 citations
- Lequa: A Learning-Based Query-Aware Framework for Selective Query OptimizationGuoneng Li, Pengfei Zheng, Ling Xu, Yan Li et al.ICDE 2026
- Lero: A Learning-to-Rank Query OptimizerRong Zhu, Wei Chen, Bolin Ding, Xingguang Chen et al.VLDB 2023 · 102 citations
- APQO: An Adaptive Framework for Parametric Query OptimizationSijia Li, Peng Cai, Zhifan Zhang, Huiqi Hu et al.SIGMOD 2026 · 2 citations
- Practical Parameterized Query Optimization via Efficient Plan Reuse and List-wise RankingHai Lan, Yang Yu, Zhifeng Bao, Zi Huang et al.SIGMOD 2026
