FOSS: A Self-Learned Doctor for Query Optimizer
Kai Zhong, Luming Sun, Tao Ji, Cuiping Li, Hong Chen
Abstract
Various works have utilized deep learning to address the query optimization problem in database system. They either learn to construct plans from scratch in a bottom-up manner or steer the plan generation behavior of traditional optimizer using hints. While these methods have achieved some success, they face challenges in either low training efficiency or limited plan search space. To address these challenges, we introduce FOSS, a novel framework for query optimization based on deep reinforcement learning. FOSS initiates optimization from the original plan generated by a traditional optimizer and incrementally refines suboptimal nodes of the plan through a sequence of actions. Additionally, we devise an asymmetric advantage model to evaluate the advantage between two plans. We integrate it with a traditional optimizer to form a simulated environment. Leveraging this simulated environment, FOSS can bootstrap itself to rapidly generate a large amount of high-quality simulated experiences. FOSS then learns from these experiences to improve its optimization capability. We evaluate the performance of FOSS on Join Order Benchmark, TPC-DS, and Stack Overflow. The experimental results demonstrate that FOSS outperforms the state-of-the-art methods in terms of latency performance. Compared to PostgreSQL, FOSS achieves speedup ranging from 1.15x to 8.33x in total latency across different benchmarks.
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 7d99f4e7-ee9d-487d-90db-680fe0e165fdBuilds on12
- Asymmetric Loss For Multi-Label ClassificationTal Ridnik, Emanuel Ben Baruch, Nadav Zamir, Asaf Noy et al.ICCV 2021 · 778 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
- QueryFormer: A Tree Transformer Model for Query Plan RepresentationYue Zhao, Gao Cong, Jiachen Shi, Chunyan MiaoVLDB 2022 · 117 citations
- Lero: A Learning-to-Rank Query OptimizerRong Zhu, Wei Chen, Bolin Ding, Xingguang Chen et al.VLDB 2023 · 102 citations
Related papers
- Balsa: Learning a Query Optimizer Without Expert DemonstrationsZongheng Yang, Wei-Lin Chiang, Sifei Luan, Gautam Mittal et al.SIGMOD 2022 · 99 citations
- LOGER: A Learned Optimizer towards Generating Efficient and Robust Query Execution PlansTianyi Chen, Jun Gao, Hedui Chen, Yaofeng TuVLDB 2023 · 54 citations
- GLO: Towards Generalized Learned Query OptimizationTianyi Chen, Jun Gao, Yaofeng Tu, Mo XuICDE 2024 · 7 citations
- LEON: A New Framework for ML-Aided Query OptimizationXu Chen, Haitian Chen, Zibo Liang, Shuncheng Liu et al.VLDB 2023 · 52 citations
- Efficient Join Order Selection Learning with Graph-based RepresentationJin Chen, Guanyu Ye, Yan Zhao, Shuncheng Liu et al.KDD 2022 · 27 citations
