The Unreasonable Effectiveness of LLMs for Query Optimization

Peter Akioyamen, Zixuan Yi, Ryan Marcus
11/5/2024
cs.DBcs.LG

No official code found. Best implementation: peter-ai/LLMSteer (10 stars, last commit 2025-05-06).

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.

View on arXivView PDF

Code Implementations(1)

peter-ai/LLMSteerCommunity100%

NeurIPS'24 MLforSys Workshop: LLMSteer

103Python, Jupyter NotebookSep 22, 20241 years ago

Similar Papers

Cite this paper

@article{akioyamen2024unreasonable,
  title  = {The Unreasonable Effectiveness of LLMs for Query Optimization},
  author = {Peter Akioyamen and Zixuan Yi and Ryan Marcus},
  year   = {2024},
  eprint = {2411.02862},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2411.02862v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2411.02862.svg)](https://codeofpaper.com/paper/2411.02862)

Discussion