BenderGPT: LLM Assisted Query Optimizing
Forfatter
Aarekol, Asbjørn GislesonSammendrag
Large language models have recently shown the ability to perform complex reasoning and planning tasks far beyond their original training objectives, yet they rarely serve as autonomous building blocks in production systems. Meanwhile, database query optimizers remain rigid, handcrafted systems that struggle with large complex queries. To bridge this gap, we introduce BenderGPT, a pluggable LLM‐powered query optimizer that consumes logical plans and schema metadata, and produces physical execution plans via few-shot examples. We implement BenderGPT as a Rust/Python pipeline integrated with Apache DataFusion and demonstrate that it can generate valid execution plans for 2–8-way joins—achieving functional parity with traditional optimizers on this subset of queries. Precision-assisted prompting cuts prompt size by 70% (1,524→432 tokens) and flattens planning latency from 8.7s to 47.4s across join complexities—near-linear scaling versus superlinear growth in a unmodified LLM workflow. By demonstrating LLM assisted optimization in a previously unexplored domain, this work opens new avenues for research into model-based system components across database engines.
Forlag
UiT The Arctic University of NorwayMetadata
Vis full innførselSamlinger
Copyright 2025 The Author(s)