SEFRQO: A Self-Evolving Fine-Tuned RAG-Based Query Optimizer
Hanwen Liu, Qihan Zhang, Ryan Marcus, Ibrahim Sabek

TL;DR
SEFRQO is a self-evolving query optimizer that uses a retrieval-augmented generation framework to improve query performance by learning from execution feedback and leveraging in-context learning, outperforming existing methods.
Contribution
It introduces a novel self-evolving framework combining RAG and fine-tuning to continuously improve query optimization without retraining.
Findings
Achieves up to 65.05% reduction in query latency on CEB workload.
Achieves up to 93.57% reduction in query latency on Stack workload.
Outperforms state-of-the-art learned query optimizers.
Abstract
Query optimization is a crucial problem in database systems that has been studied for decades. Learned query optimizers (LQOs) can improve performance over time by incorporating feedback; however, they suffer from cold-start issues and often require retraining when workloads shift or schemas change. Recent LLM-based query optimizers leverage pre-trained and fine-tuned LLMs to mitigate these challenges. Nevertheless, they neglect LLMs' in-context learning and execution records as feedback for continuous evolution. In this paper, we present SEFRQO, a Self-Evolving Fine-tuned RAG-based Query Optimizer. SEFRQO mitigates the cold-start problem of LQOs by continuously learning from execution feedback via a Retrieval-Augmented Generation (RAG) framework. We employ both supervised fine-tuning and reinforcement fine-tuning to prepare the LLM to produce syntactically correct and…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
