Skip to main content
QUICK REVIEW

[論文レビュー] Making Databases Faster with LLM Evolutionary Sampling

Mehmet Hamza Erol, Xiangpeng Hao|arXiv (Cornell University)|Feb 11, 2026
Advanced Database Systems and QueriesComputer Science被引用数 0
ひとこと要約

論文は、LLMを用いてデータベースエンジンの物理クエリプランへ意味的・局所的な編集を提案し、進化的サンプリングで実行計画を最適化するハーネスであるDBPlanBenchを提示し、OLAPクエリで最大4.78xの速度向上を達成し、小規模から大規模への移行を実証する。

ABSTRACT

Traditional query optimization relies on cost-based optimizers that estimate execution cost (e.g., runtime, memory, and I/O) using predefined heuristics and statistical models. Improving these heuristics requires substantial engineering effort, and even when implemented, these heuristics often cannot take into account semantic correlations in queries and schemas that could enable better physical plans. Using our DBPlanBench harness for the DataFusion engine, we expose the physical plan through a compact serialized representation and let the LLM propose localized edits that can be applied and executed. We then apply an evolutionary search over these edits to refine candidates across iterations. Our key insight is that LLMs can leverage semantic knowledge to identify and apply non-obvious optimizations, such as join orderings that minimize intermediate cardinalities. We obtain up to 4.78$ imes$ speedups on some queries and we demonstrate a small-to-large workflow in which optimizations found on small databases transfer effectively to larger databases.

研究の動機と目的

  • 従来のコストベースのヒューリスティクスを超えた意味論的知識を活用してクエリ計画最適化を改善する動機付け。
  • コンパクトでトークン効率の良いシリアライズを介してデータベースエンジンの物理計画をLLMに露出させ、操作する。
  • 意味論的カーディナリティ推定に導かれた局所的なプラン編集が大幅な速度向上をもたらし得ることを示す。
  • 小規模データベースで見つかった最適化が大規模データベースへ効果的に転移することを示す。

提案手法

  • 専用のJSONシリアライゼーション層を通じてDataFusionの物理計画を露出し、コンパクトな表現へ変換。
  • プランとパッチベースの編集インターフェースをLLMに提供して局所的なJSON Patch操作を生成。
  • 進化的サンプリングフレームワーク(PST-EvolおよびBoL-Evol)を用いてパッチを反復適用し、サンドボックス実行でエンドツーエンドの実行時間を評価。
  • LLMに意味論的カーディナリティ推定を実行させ、結合サイドの選択と結合再配置の変換を提案。
  • DataFusionで変換後の計画を実行し、複数のサンドボックスで頑健性と正確性を測定して信頼性の高い速度向上を得る。
Figure 1 : Semantic-aware Join Optimization. By identifying the high selectivity of the ‘date’ predicate, the plan can be reordered to prune data early, significantly reducing the cardinality of the subsequent JOIN . We explore this use case in Section 5 .
Figure 1 : Semantic-aware Join Optimization. By identifying the high selectivity of the ‘date’ predicate, the plan can be reordered to prune data early, significantly reducing the cardinality of the subsequent JOIN . We explore this use case in Section 5 .

実験結果

リサーチクエスチョン

  • RQ1意味論的知識を活用するLLMは、従来のルールベース最適化よりもプラン全体および局所の最適化を発見できるか?
  • RQ2 serialized 物理計画へ対する局所的JSON Patch編集のみで、完全なプラン書き換えなしに有意な速度向上を達成できるか?
  • RQ3小規模で見つけた最適化は、パフォーマンス向上を維持したまま大規模データベースへ転用可能か?

主な発見

  • LLMsは substantial なクエリ計画の速度向上を達成でき、特定のTPC-DS由来のクエリでエンドツーエンド4.78xの改善を達成。
  • 平均的には、TPC-Hで中央値の速度向上が約1.15x〜1.2x、TPC-DSでは約1.1xで、評価されたワークロード全体で見られた。
  • 意味論的で直感に反する最適化には、カーディナリティ推論に導かれた結合再配置と結合サイドのスワップなど、従来のヒューリスティクスが見逃しうる要素が含まれる。
  • 小規模で発見された最適化は、大規模データベースへ効果的に転移し、決定論的移行手順の下で速度向上のパターンを維持する。
  • 3つの進化的ステップでほぼピークに近い速度向上を得られることが一般的で、ステップ3を超えるとリターンは減少。
  • このアプローチは、複数の複雑な多結合クエリでベースラインのDataFusion最適化を上回る。
Figure 2 : DBPlanBench , provides accessible APIs to extract a physical plan that an LLM can edit. This plan can be then executed in DataFusion as if it was a native DataFusion plan.
Figure 2 : DBPlanBench , provides accessible APIs to extract a physical plan that an LLM can edit. This plan can be then executed in DataFusion as if it was a native DataFusion plan.

この論文を読む

Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。

Nubintでこの論文を読む

このレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。