Lune

VLDB2023Top-tier venue

BASE: Bridging the Gap between Cost and Latency for Query Optimization

Xu Chen, Zhen Wang, Shuncheng Liu, Yaliang Li, Kai Zeng, Bolin Ding, Jingren Zhou, Han Su, Kai Zheng

Abstract

Some recent works have shown the advantages of reinforcement learning (RL) based learned query optimizers. These works often use the cost (i.e., the estimation of cost model) or the latency (i.e., execution time) as guidance signals for training their learned models. However, cost-based learning underperforms in latency and latency-based learning is time-intensive. In order to bypass such a dilemma, researchers attempt to transfer a learned value network from the cost domain to the latency domain. We recognize critical insights in cost/latency-based training, prompting us to transfer the reward function rather than the value network. Based on this idea, we propose a two-stage RL-based framework, BASE , to bridge the gap between cost and latency. After learning a policy based on cost signals in its first stage, BASE formulates transferring the reward function as a variant of inverse reinforcement learning. Intuitively, BASE learns to calibrate the reward function and updates the policy regarding the calibrated one in a mutually-improved manner. Extensive experiments exhibit the superiority of BASE on two benchmark datasets: Our optimizer outperforms traditional DBMS, using 30% less training time than SOTA methods. Meanwhile, our approach can enhance the efficiency of other learning-based optimizers.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

6 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Conformal Prediction for Verifiable Learned Query Optimization cites Balsa: Learning a Query Optimizer Without Expert Demonstrations
  • Conformal Prediction for Verifiable Learned Query Optimization cites Reinforcement Learning with Tree-LSTM for Join Order Selection
  • Conformal Prediction for Verifiable Learned Query Optimization cites Bao: Making Learned Query Optimization Practical
  • DACE: A Database-Agnostic Cost Estimator cites Reinforcement Learning with Tree-LSTM for Join Order Selection
  • DACE: A Database-Agnostic Cost Estimator cites Bao: Making Learned Query Optimization Practical
  • Balsa: Learning a Query Optimizer Without Expert Demonstrations cites Bao: Making Learned Query Optimization Practical
  • PilotScope: Steering Databases with Machine Learning Drivers cites Balsa: Learning a Query Optimizer Without Expert Demonstrations
  • PilotScope: Steering Databases with Machine Learning Drivers cites Bao: Making Learned Query Optimization Practical
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers6

  1. PilotScope: Steering Databases with Machine Learning DriversRong Zhu, Lianggui Weng, Wenqing Wei, Di Wu et al.VLDB 2024 · 18 citations
  2. DACE: A Database-Agnostic Cost EstimatorZibo Liang, Xu Chen, Yuyang Xia, Runfan Ye et al.ICDE 2024 · 8 citations
  3. Conformal Prediction for Verifiable Learned Query OptimizationHanwen Liu, Shashank Giridhara, Ibrahim SabekVLDB 2025 · 2 citations
  4. Optimizing Block Skipping for High-Dimensional Data with Learned Adaptive CurveXu Chen, Shuncheng Liu, Tong Yuan, Tao Ye et al.SIGMOD 2025 · 2 citations
  5. Auto-regressive In-context Demonstration SelectionYunzhe Qi, Sirui Chen, Jiaru Zou, Jingrui HeICML 2026

Builds on4

  1. Bao: Making Learned Query Optimization PracticalRyan Marcus, Parimarjan Negi, Hongzi Mao, Nesime Tatbul et al.SIGMOD 2021 · 242 citations
  2. Reinforcement Learning with Tree-LSTM for Join Order SelectionXiang Yu, Guoliang Li, Chengliang Chai, Nan TangICDE 2020 · 168 citations
  3. Balsa: Learning a Query Optimizer Without Expert DemonstrationsZongheng Yang, Wei-Lin Chiang, Sifei Luan, Gautam Mittal et al.SIGMOD 2022 · 99 citations
  4. Active Learning for ML Enhanced Database SystemsLin Ma, Bailu Ding, Sudipto Das, Adith SwaminathanSIGMOD 2020 · 57 citations

Related papers

  1. LEON: A New Framework for ML-Aided Query OptimizationXu Chen, Haitian Chen, Zibo Liang, Shuncheng Liu et al.VLDB 2023 · 52 citations
  2. FOSS: A Self-Learned Doctor for Query OptimizerKai Zhong, Luming Sun, Tao Ji, Cuiping Li et al.ICDE 2024 · 5 citations
  3. Cost-based or Learning-based? A Hybrid Query Optimizer for Query Plan SelectionXiang Yu, Chengliang Chai, Guoliang Li, Jiabin LiuVLDB 2022 · 82 citations
  4. Lequa: A Learning-Based Query-Aware Framework for Selective Query OptimizationGuoneng Li, Pengfei Zheng, Ling Xu, Yan Li et al.ICDE 2026
  5. Lero: A Learning-to-Rank Query OptimizerRong Zhu, Wei Chen, Bolin Ding, Xingguang Chen et al.VLDB 2023 · 102 citations
Dusk over the sea between two cliffs drawn in fine vertical lines