English

The Unreasonable Effectiveness of LLMs for Query Optimization

Databases 2024-11-06 v1 Machine Learning

Abstract

Recent work in database query optimization has used complex machine learning strategies, such as customized reinforcement learning schemes. Surprisingly, we show that LLM embeddings of query text contain useful semantic information for query optimization. Specifically, we show that a simple binary classifier deciding between alternative query plans, trained only on a small number of labeled embedded query vectors, can outperform existing heuristic systems. Although we only present some preliminary results, an LLM-powered query optimizer could provide significant benefits, both in terms of performance and simplicity.

Keywords

Cite

@article{arxiv.2411.02862,
  title  = {The Unreasonable Effectiveness of LLMs for Query Optimization},
  author = {Peter Akioyamen and Zixuan Yi and Ryan Marcus},
  journal= {arXiv preprint arXiv:2411.02862},
  year   = {2024}
}

Comments

To appear in the Machine Learning for Systems Workshop at NeurIPS 2024

R2 v1 2026-06-28T19:48:34.278Z