EUVIMEDEUVIMED entdecken
Crossref

SEFRQO: A Self-Evolving Fine-Tuned RAG-Based Query Optimizer

Hanwen Liu, Qihan Zhang, Ryan Marcus, Ibrahim Sabek

Proceedings of the ACM on Management of Data · 04.12.2025 · 3 (6) · 1-27

DOI: 10.1145/3769826 ↗

Kurz gefasst

Fachartikel in der Zeitschrift Proceedings of the ACM on Management of Data, online erschienen am 05.12.2025. Verfasst von Hanwen Liu und 3 weiteren Autor:innen. Die Arbeit wurde bisher 4-mal zitiert (Crossref) und nennt 66 Literaturangaben.

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

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 S elf- E volving F ine-tuned R AG-based Q uery O ptimizer. 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 performance-efficient query hints. Moreover, SEFRQO leverages the LLM's in-context learning capabilities by dynamically constructing prompts with references to similar queries and the historical execution record of the same query. This self-evolving paradigm iteratively optimizes the prompt to minimize query execution latency. Evaluations show that SEFRQO outperforms state-of-the-art LQOs, achieving up to 65.05% and 93.57% reductions in query latency on the CEB and Stack workloads, respectively, compared to PostgreSQL.

Zitieren

APA

Liu, H., Zhang, Q., Marcus, R., & Sabek, I. (2025). SEFRQO: A Self-Evolving Fine-Tuned RAG-Based Query Optimizer. Proceedings of the ACM on Management of Data, 3(6), 1-27. https://doi.org/10.1145/3769826

Vancouver

Liu H, Zhang Q, Marcus R, Sabek I. SEFRQO: A Self-Evolving Fine-Tuned RAG-Based Query Optimizer. Proceedings of the ACM on Management of Data. 2025;3(6):1-27. doi:10.1145/3769826

BibTeX
@article{Liu2025,
  author = {Liu, Hanwen and Zhang, Qihan and Marcus, Ryan and Sabek, Ibrahim},
  title = {SEFRQO: A Self-Evolving Fine-Tuned RAG-Based Query Optimizer},
  journal = {Proceedings of the ACM on Management of Data},
  year = {2025},
  volume = {3},
  number = {6},
  pages = {1--27},
  doi = {10.1145/3769826}
}
Kostenlos starten →