mlsanityData to 7 Oct 2026

Lero: A Learning-to-Rank Query Optimizer

arXiv 2302.06873 ↗First posted 14 Feb 2023cs.DB cs.AIcited by 26

Not on the map. Why?

Abstract (arXiv)

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.

Key facts. Cited by 26 papers in the map (data through 7 Oct 2026). Builds on 20 of its 57 references that are in the map. First posted on arXiv 14 Feb 2023.

Builds on

20 of 57 references.

References · 20

  1. 2017Revisiting Distributed Synchronous SGDcited by 142
  2. 2019Neo: A Learned Query Optimizercited by 80
  3. 2018Learned Cardinalities: Estimating Correlated Joins with Deep Learningcited by 64
  4. 2020Bao: Learning to Steer Query Optimizerscited by 62
  5. 2019SetRank: Learning a Permutation-Invariant Ranking Model for Information Retrievalcited by 48
  6. 2019An End-to-End Learning-based Cost Estimatorcited by 43
  7. 2019Deep Unsupervised Cardinality Estimationcited by 36
  8. 2015A Survey on Contextual Multi-armed Banditscited by 34
  9. 2018Learning to Optimize Join Queries With Deep Reinforcement Learningcited by 32
  10. 2021Cardinality Estimation in DBMS: A Comprehensive Benchmark Evaluationcited by 30
  11. 2020PiRank: Scalable Learning To Rank via Differentiable Sortingcited by 26
  12. 2019Plan-Structured Deep Neural Network Models for Query Performance Predictioncited by 24
8 more
  1. 2020FLAT: Fast, Lightweight and Accurate Method for Cardinality Estimationcited by 22
  2. 2020NeuroCard: One Cardinality Estimator for All Tablescited by 21
  3. 2019DeepDB: Learn from Data, not from Queries!cited by 20
  4. 2020Are We Ready For Learned Cardinality Estimation?cited by 19
  5. 2022Balsa: Learning a Query Optimizer Without Expert Demonstrationscited by 18
  6. 2019SkinnerDB: Regret-Bounded Query Evaluation via Reinforcement Learningcited by 17
  7. 2020BayesCard: Revitilizing Bayesian Frameworks for Cardinality Estimationcited by 10
  8. 2021Efficient Deep Learning Pipelines for Accurate Cost Estimations Over Large Scale Query Workloadcited by 4

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2023: 1; 2024: 7; 2025: 11; 2026: 7.

26 papers.

Sort:

By area:

  1. 2024E2ETune: End-to-End Knob Tuning via Fine-tuned Generative Language Modelcited by 9
  2. 2024NeurDB: An AI-powered Autonomous Data Systemcited by 5
  3. 2024NeurDB: On the Design and Implementation of an AI-powered Autonomous Databasecited by 5
  4. 2024CARROT: A Learned Cost-Constrained Retrieval Optimization System for RAGcited by 5
  5. 2025RCRank: Multimodal Ranking of Root Causes of Slow Queries in Cloud Database Systemscited by 4
  6. 2025A Learned Cost Model-based Cross-engine Optimizer for SQL Workloadscited by 2
  7. 2026AI-Driven Research for Databasescited by 2
  8. 2023FOSS: A Self-Learned Doctor for Query Optimizercited by 1
  9. 2024Robust Plan Evaluation based on Approximate Probabilistic Machine Learningcited by 1
  10. 2024GenJoin: Conditional Generative Plan-to-Plan Query Optimizer that Learns from Subplan Hintscited by 1
  11. 2024Query Performance Explanation through Large Language Model for HTAP Systemscited by 1
  12. 2025Large Scale Multi-Task Bayesian Optimization with Large Language Modelscited by 1
14 more
  1. 2025Reqo: A Comprehensive Learning-Based Cost Model for Robust and Explainable Query Optimizationcited by 0
  2. 2025Low Rank Learning for Offline Query Optimizationcited by 0
  3. 2025Training-Free Query Optimization via LLM-Based Plan Similaritycited by 0
  4. 2025LLM4Hint: Leveraging Large Language Models for Hint Recommendation in Offline Query Optimizationcited by 0
  5. 2025AutoIndexer: A Reinforcement Learning-Enhanced Index Advisor Towards Scaling Workloadscited by 0
  6. 2025Bootstrapping Learned Cost Models with Synthetic SQL Queriescited by 0
  7. 2025OntoTune: Ontology-Driven Learning for Query Optimization with Convolutional Modelscited by 0
  8. 2025CoLSE: A Lightweight and Robust Hybrid Learned Model for Single-Table Cardinality Estimation using Joint CDFcited by 0
  9. 2026Piece of CAKE: Adaptive Execution Engines via Microsecond-Scale Learningcited by 0
  10. 2026MICRO: A Lightweight Middleware for Optimizing Cross-store Cross-model Graph-Relation Joins [Technical Report]cited by 0
  11. 2026RELOAD: A Robust and Efficient Learned Query Optimizer for Database Systemscited by 0
  12. 2026Opti-Q: A Constraint-Based Optimization Framework for Multi-LLM Question Planningcited by 0
  13. 2026Fully Inductive Cardinality Estimationcited by 0
  14. 2026ScaleSense: Cost-Intelligent Scaling Framework via Learned Resource Estimation in Alibaba AnalyticDBcited by 0