Lune

VLDB2023顶会

Lero: A Learning-to-Rank Query Optimizer

Rong Zhu, Wei Chen, Bolin Ding, Xingguang Chen, Andreas Pfadler, Ziniu Wu, Jingren Zhou

摘要

A recent line of works apply machine learning techniques to assist or rebuild cost-based query optimizers in DBMS. While exhibiting superiority in some benchmarks, their deficiencies, e.g., unstable performance, high training cost, and slow model updating, stem from the inherent hardness of predicting the cost or latency of execution plans using machine learning models. In this paper, we introduce a learning-to-rank query optimizer, called Lero, which builds on top of a native query optimizer and continuously learns to improve the optimization performance. The key observation is that the relative order or rank of plans, rather than the exact cost or latency, is sufficient for query optimization. Lero employs a pairwise approach to train a classifier to compare any two plans and tell which one is better. Such a binary classification task is much easier than the regression task to predict the cost or latency, in terms of model efficiency and accuracy. Rather than building a learned optimizer from scratch, Lero is designed to leverage decades of wisdom of databases and improve the native query optimizer. With its non-intrusive design, Lero can be implemented on top of any existing DBMS with minimal integration efforts. We implement Lero and demonstrate its outstanding performance using PostgreSQL. In our experiments, Lero achieves near optimal performance on several benchmarks. It reduces the plan execution time of the native optimizer in PostgreSQL by up to 70% and other learned query optimizers by up to 37%. Meanwhile, Lero continuously learns and automatically adapts to query workloads and changes in data.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 38 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • λ-Tune: Harnessing Large Language Models for Automated Database System Tuning 引用了 Bao: Making Learned Query Optimization Practical
  • Sample-Efficient Cardinality Estimation Using Geometric Deep Learning 引用了 Deep Unsupervised Cardinality Estimation
  • Sample-Efficient Cardinality Estimation Using Geometric Deep Learning 引用了 An End-to-End Learning-based Cost Estimator
  • Sample-Efficient Cardinality Estimation Using Geometric Deep Learning 引用了 Cardinality Estimation in DBMS: A Comprehensive Benchmark Evaluation
  • PilotScope: Steering Databases with Machine Learning Drivers 引用了 Eraser: Eliminating Performance Regression on Learned Query Optimizer
  • PilotScope: Steering Databases with Machine Learning Drivers 引用了 Bao: Making Learned Query Optimization Practical
  • Eraser: Eliminating Performance Regression on Learned Query Optimizer 引用了 An End-to-End Learning-based Cost Estimator
  • Eraser: Eliminating Performance Regression on Learned Query Optimizer 引用了 Cardinality Estimation in DBMS: A Comprehensive Benchmark Evaluation
  • Eraser: Eliminating Performance Regression on Learned Query Optimizer 引用了 Bao: Making Learned Query Optimization Practical
  • An End-to-End Learning-based Cost Estimator 引用了 Reinforcement Learning with Tree-LSTM for Join Order Selection
  • Reinforcement Learning with Tree-LSTM for Join Order Selection 引用了 An End-to-End Learning-based Cost Estimator
  • Cardinality Estimation in DBMS: A Comprehensive Benchmark Evaluation 引用了 An End-to-End Learning-based Cost Estimator
  • Bao: Making Learned Query Optimization Practical 引用了 Deep Unsupervised Cardinality Estimation
  • Bao: Making Learned Query Optimization Practical 引用了 An End-to-End Learning-based Cost Estimator
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper38

  1. λ-Tune: Harnessing Large Language Models for Automated Database System TuningVictor Giannakouris, Immanuel TrummerSIGMOD 2025 · 20 次引用
  2. Sample-Efficient Cardinality Estimation Using Geometric Deep LearningSilvan Reiner, Michael GrossniklausVLDB 2024 · 20 次引用
  3. Eraser: Eliminating Performance Regression on Learned Query OptimizerLianggui Weng, Rong Zhu, Di Wu, Bolin Ding 等VLDB 2024 · 19 次引用
  4. PilotScope: Steering Databases with Machine Learning DriversRong Zhu, Lianggui Weng, Wenqing Wei, Di Wu 等VLDB 2024 · 18 次引用
  5. BFTBrain: Adaptive BFT Consensus with Reinforcement LearningChenyuan Wu, Haoyun Qin, Mohammad Javad Amiri, Boon Thau Loo 等NSDI 2025 · 17 次引用

它引用的 Paper13

  1. An End-to-End Learning-based Cost EstimatorJi Sun, Guoliang LiVLDB 2020 · 251 次引用
  2. Bao: Making Learned Query Optimization PracticalRyan Marcus, Parimarjan Negi, Hongzi Mao, Nesime Tatbul 等SIGMOD 2021 · 242 次引用
  3. Deep Unsupervised Cardinality EstimationZongheng Yang, Eric Liang, Amog Kamsetty, Chenggang Wu 等VLDB 2020 · 206 次引用
  4. Cardinality Estimation in DBMS: A Comprehensive Benchmark EvaluationYuxing Han, Ziniu Wu, Peizhi Wu, Rong Zhu 等VLDB 2022 · 169 次引用
  5. Reinforcement Learning with Tree-LSTM for Join Order SelectionXiang Yu, Guoliang Li, Chengliang Chai, Nan TangICDE 2020 · 168 次引用

相关 Paper

  1. RankPQO: Learning-to-Rank for Parametric Query OptimizationSongsong Mo, Yue Zhao, Zhifeng Bao, Quanqing Xu 等VLDB 2025 · 3 次引用
  2. Athena: An Effective Learning-based Framework for Query Optimizer Performance ImprovementRunzhong Li, Qilong Li, Haotian Liu, Rui Mao 等SIGMOD 2025 · 3 次引用
  3. Practical Parameterized Query Optimization via Efficient Plan Reuse and List-wise RankingHai Lan, Yang Yu, Zhifeng Bao, Zi Huang 等SIGMOD 2026
  4. How Good are Learned Cost Models, Really? Insights from Query Optimization TasksRoman Heinrich, Manisha Luthra, Johannes Wehrstein, Harald Kornmayer 等SIGMOD 2025 · 13 次引用
  5. Cost-based or Learning-based? A Hybrid Query Optimizer for Query Plan SelectionXiang Yu, Chengliang Chai, Guoliang Li, Jiabin LiuVLDB 2022 · 82 次引用
黄昏的海面,两侧是细线勾勒的悬崖