Training-Free Query Optimization via LLM-Based Plan Similarity
Not on the map. Why?
Abstract (arXiv)
Large language model (LLM) embeddings offer a promising new avenue for database query optimization. In this paper, we explore how pre-trained execution plan embeddings can guide SQL query execution without the need for additional model training. We introduce LLM-PM (LLM-based Plan Mapping), a framework that embeds the default execution plan of a query, finds its k nearest neighbors among previously executed plans, and recommends database hintsets based on neighborhood voting. A lightweight consistency check validates the selected hint, while a fallback mechanism searches the full hint space when needed. Evaluated on the JOB-CEB benchmark using OpenGauss, LLM-PM achieves an average speed-up of 21% query latency reduction. This work highlights the potential of LLM-powered embeddings to deliver practical improvements in query performance and opens new directions for training-free, embedding-based optimizer guidance systems.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 10 of its 16 references that are in the map. First posted on arXiv 6 Jun 2025.
Builds on
10 of 16 references.
References · 10
- 2019Neo: A Learned Query Optimizercited by 80
- 2018Learned Cardinalities: Estimating Correlated Joins with Deep Learningcited by 64
- 2020Bao: Learning to Steer Query Optimizerscited by 62
- 2023Lero: A Learning-to-Rank Query Optimizercited by 26
- 2024LLM-R2: A Large Language Model Enhanced Rule-based Rewrite System for Boosting Query Efficiencycited by 16
- 2025Can Large Language Models Be Query Optimizer for Relational Databases?cited by 11
- 2023COOOL: A Learning-To-Rank Approach for SQL Hint Recommendationscited by 4
- 2024The Unreasonable Effectiveness of LLMs for Query Optimizationcited by 4
- 2024HERO: Hint-Based Efficient and Reliable Query Optimizercited by 3
- 2024Adaptive Cost Model for Query Optimizationcited by 2
Built on by
Not cited yet.