Pith. sign in

REVIEW 4 major objections 5 minor 4 cited by

Can Large Language Models Be Query Optimizer for Relational Databases?

T0 review · 4 major / 5 minor · reviewed 2026-08-08 · deepseek-v4-flash

Pith's one-line read A fine-tuned 8B language model can serve as a SQL query optimizer: it writes physical execution plans directly as text and beats PostgreSQL, Oracle, Bao, and HybridQO on three workloads.

desk verdict First real attempt at an LLM that writes physical query plans directly; DSB gains are real, but the OOD generalization claim needs a prompt-source disclosure. read the letter →

arxiv 2502.05562 v1 pith:PAHKPXTC submitted 2025-02-08 cs.DB

classification cs.DB
keywords queryoptimizationlargelanguagemodelsexecutionplangenerationdirectpreferenceinstructiontuningrelationaldatabasesjoinorderQInstruct
verification ladder T0 review T1 audit T2 compute T3 formal

The pith

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

The reading

This paper asks whether a general-purpose large language model can replace the traditional 'enumerate plans and pick by cost model' loop of a relational database optimizer. It proposes LLM-QO, a fine-tuned LLaMA-3-8B built on PostgreSQL's execution engine, which writes an execution plan directly as text. The authors design a data recipe, QInstruct, and a two-stage training procedure: Query Instruction Tuning to imitate the best plan among several optimizers, then Query Direct Preference Optimization to favor fast plans over slow ones. Their central claim is that this recipe yields valid, high-quality plans whose average execution times are 91.4%, 94.4%, and 31.3% of PostgreSQL's on IMDB, JOB-light, and DSB, beating both traditional and learned optimizers. If true, query optimization becomes a sequence-generation task that can absorb planning expertise from multiple optimizers without explicit plan enumeration.

What carries the argument

Two mechanisms carry the argument. First, QInstruct, the data recipe, serializes the planning task into text: an instruction, the SQL query, per-column statistics as [min, max, distinct-count] triples, a one-shot demonstration whose query template matches the input, and a target plan written as a planning path (one bracket step per join, in post-order) followed by the full bracket sequence. This representation is what lets a general-purpose LLM treat plan construction as next-token prediction. Second, the two-stage training pipeline: Query Instruction Tuning minimizes negative log-likelihood over the best plan among several optimizers, and Query Direct Preference Optimization applies a DPO-style loss, with the QIT model as reference, to raise the probability of fast plans and lower the probability of slow ones. The planning path is load-bearing for the second stage: ablation shows removing it degrades QDPO performance.

What would settle it

Run the out-of-distribution evaluation with the one-shot demonstration removed or replaced by a non-matching template and compare invalid-plan rates and execution times; if the model's advantage over PostgreSQL disappears or invalid plans spike, the claimed generalization is carried by the demonstration rather than by the trained planner.

Watch

Extended reading notes

Core claim

The authors claim that query optimization can be formulated as an autoregressive text-generation problem: given a SQL query, per-column statistics in a compact bracket format, and a one-shot planning demonstration, the LLM emits a planning path followed by a bracket-sequence final answer that PostgreSQL can execute. Using LLaMA-3-8B with the two-stage QIT and QDPO training, LLM-QO generates valid plans and achieves lower average execution times than PostgreSQL, Oracle, Bao, and HybridQO on all three workloads; on DSB the QDPO model averages 31.3% of PostgreSQL's execution time. The paper further claims template-level generalization to out-of-distribution queries for the instruction-tuned model and adaptability to new optimizer preferences when DB2 plans are added in the preference stage, while noting that QDPO fine-tuning on fully unseen templates produced many invalid plans.

Load-bearing premise

The load-bearing premise is that a one-shot planning demonstration with the same query template as the input is always available; the out-of-distribution experiments use templates absent from training, so those results depend on how such a demonstration is supplied, which the paper does not specify.

Editorial extensions

If this is right

  • A planner's ceiling is no longer set by an enumerated candidate set or a hand-tuned cost model; the LLM can in principle synthesize plans no single optimizer enumerates.
  • A single model can distill the preferences of several DBMS optimizers at once, and new optimizers can be folded in through fresh preference data, as shown when DB2 plans improved DSB performance.
  • The QInstruct prompt components matter: removing database statistics or the one-shot demonstration hurts both stages, and removing the planning path hurts the preference stage in particular.
  • The framework is backbone-agnostic in the authors' tests: QIT and QDPO improved LLaMA-3-8B, LLaMA-2-7B, CodeLLaMA-7B, and Mistral-7B on DSB, although Mistral-7B produced 34 invalid plans after QDPO.

Reading between the lines

Editorial extensions of the paper, not claims the author makes directly.

  • The paper leaves implicit that a same-template demonstration must exist at inference time; for genuinely new templates, deployment would need a separate mechanism to supply one, and the OOD results do not specify how that works.
  • Because preference data is built from measured execution times on one PostgreSQL configuration with one buffer and memory setting, the resulting model is implicitly tied to that environment; moving hardware or engine settings would plausibly require regenerating the preference data.
  • A testable extension the paper does not run: corrupt or randomize the supplied statistics and see whether join-order choices change as a cost model's would, which would separate genuine plan reasoning from template-conditional pattern matching.
Share X Bluesky LinkedIn Reddit HN

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, and a circularity audit.

Referee Report

4 major / 5 minor

Summary. The paper proposes LLM-QO, a framework that fine-tunes LLaMA-3-8B to generate PostgreSQL execution plans directly as text for SPJ queries, without explicit plan enumeration. The QInstruct data recipe serializes the SQL query, per-column statistics, an instruction, and a one-shot planning demonstration into a prompt, and represents the target plan as a planning path plus a bracket expression. Training proceeds in two stages: Query Instruction Tuning (QIT) performs supervised fine-tuning on the empirically fastest plan among PostgreSQL, Oracle, and DB2, and Query Direct Preference Optimization (QDPO) applies DPO to preference pairs built from those plans. Experiments on IMDB, JOB-light, and DSB report average execution times of 91.4%, 94.4%, and 31.3% of PostgreSQL (Table 1), plus OOD experiments (Table 2), ablations, parameter studies, invalid-plan analysis, and inference-latency measurements. The central claim is that LLMs can be trained to act as effective query optimizers that generalize beyond their training workloads.

Significance. If the central results hold, the paper is a timely and useful first step: it reframes query optimization as autoregressive sequence generation, introduces a concrete textual plan representation, and shows on DSB in particular that an 8B-parameter model can beat both traditional and learned baselines. The strengths of the paper are the explicit QInstruct recipe, the planning-path representation, the two-stage training design, and the unusually thorough invalid-plan analysis in Table 4. However, the current evidence is not yet fully reproducible or cleanly interpretable: the OOD demonstration protocol is unresolved, Oracle/DB2 plan translation is unspecified, execution times have no variance information, and invalid-plan handling is not stated. These issues bear directly on the paper's headline claims, so the significance of the work is currently conditional on resolving them.

major comments (4)
  1. [§5.1, §7.3, Table 4] The OOD generalization claim is not cleanly supported because the paper does not state how the one-shot planning demonstration is constructed for OOD test queries. Section 5.1 says the demonstration must use an exemplar with the same query template as the input, but in the OOD setting of Section 7.3 the test templates are by construction absent from the training workload, so no same-template demonstration can be assembled from the training data. If the demonstration is omitted or drawn from a different template, the OOD prompts differ from the training format and Table 2 is not comparable to the in-distribution experiments; if it is drawn from a test-template query, template-level information leaks into evaluation and the test is no longer clean. The contrast in Table 4 between the 'full version' rows (0/0/1 invalid plans) and the 'w/o demo' rows (3/10/23 invalid plans) shows that the demonstration materially changes behavior. Please disclose the exact OOD prompt construction and, if needed, rerun the OOD evaluation under the same protocol as the in-distribution evaluation.
  2. [§7.1, Table 1] The central comparison in Table 1 is not reproducible as reported. The paper states that 'the generated plans of all the baselines are transformed into the format of PostgreSQL's physical plan' and mentions pg_hint_plan only for LLM-QO, but it never specifies how Oracle plans (and DB2 plans in Section 7.4) are converted into executable PostgreSQL physical plans. Without this transformation procedure, the reported Oracle and DB2 execution times cannot be independently verified. In addition, all execution times appear to be single measurements with no repeated runs, standard deviations, or confidence intervals. Given that the IMDB and JOB-light gains over PostgreSQL are only about 5-9% on the mean, the central 'outperforms' claim needs to be robust to execution-time noise; please report repeated measurements or otherwise justify that the differences exceed run-to-run variability.
  3. [§7.1, §7.5, §7.7] The paper does not state how invalid plans are treated when computing the execution-time statistics in Tables 1-4. Table 3 reports invalid counts for several variants (e.g., Mistral-7B Qdpo has 34 invalid plans, and the full version has one invalid plan in the OOD setting of Table 4), but it is unclear whether those queries are excluded from the mean/median/quantile statistics or assigned a penalty. If invalid plans are excluded, the reported execution times for those variants are computed on different query subsets, which biases the comparison in their favor. Please clarify the exact protocol for invalid plans and report results both with and without invalid-plan penalties.
  4. [§5.2, §6.1, Table 1] The framing of the results should more explicitly acknowledge the relationship between the training labels and the baselines. In Algorithm 1, the preferred plan for each training query is by construction the empirically fastest among PostgreSQL, Oracle, and DB2, so the in-distribution QIT model is essentially distilling the best-per-query baseline. The evaluation on held-out queries is not mathematically circular, and the DSB results do go beyond the best single baseline on the mean, but for IMDB and JOB-light the gains over the best baseline are small. The paper should state this distillation interpretation explicitly and distinguish it from the stronger claim that the model discovers fundamentally new plans; the case studies in Section 7.8 provide evidence for the stronger claim, but the aggregate tables alone do not.
minor comments (5)
  1. [§1] There is a typo in the introduction: 'fascinating envison' should be 'fascinating envision'.
  2. [§5.1] The phrase 'the the join operators' contains a duplicated determiner; also 'curial design' should be 'crucial design'.
  3. [§7.1] The text says 'the number of PF/FK joins'; this should be 'PK/FK joins'.
  4. [§7.3, Table 2] Table 2 reports only LLM-QO (Qit) for the OOD setting, while Section 7.3 notes that QDPO suffers from invalid plans on OOD templates; please state explicitly in the table caption or text that QDPO is omitted for this reason, and clarify whether the same OOD test set is used throughout Table 4.
  5. [§7.1] The exclusion of DSB templates that exceed 300 seconds in both PostgreSQL and Oracle should be quantified: how many templates or queries were excluded, and what fraction of the original DSB workload does this represent? This affects the representativeness of the DSB results.

Circularity Check

0 steps flagged · score 0.0 of 10

No significant circularity: the central claim rests on held-out execution-time measurement, not on a definitional reduction to the training data.

full rationale

The paper's central claim is that a fine-tuned LLaMA-3-8B can generate valid execution plans whose measured execution times beat PostgreSQL, Oracle, Bao, and HybridQO on held-out queries. This is an empirical, externally evaluated comparison. The training data do embed baseline optimizer choices: Algorithm 1 selects the preferred plan as the one with minimum execution time among PostgreSQL, Oracle, and later DB2, and QInstruct textually serializes those plans. However, evaluation is on a separate 20% test split, and execution times are measured by actually running the generated plans in PostgreSQL's engine. The LLM output is not the training label by construction; it is a generated sequence that must be parsed and executed. Thus the headline result does not reduce to the fitted inputs. The OOD generalization experiments in Section 7.3 do contain an unresolved methodological gap: Section 5.1 states that the one-shot planning demonstration must use the same query template as the input, while Section 7.3 deliberately tests templates absent from training, so the paper does not specify how a valid same-template demonstration is supplied for OOD queries. This is a reporting and experimental-validity concern, not a circularity, because no equation or definition makes the OOD result equal to the training data. There are no load-bearing self-citations, no imported uniqueness theorems, and no renaming of a known result. Accordingly, no circular step is identified.

Assumptions & free parameters 5 free parameters · 4 assumptions · 0 invented entities

No new physical entities; the planning-path text format is a representation, not an entity. The free parameters are all training and data-recipe hyperparameters chosen by the authors.

free parameters (5)
  • preference threshold r0 = 0.95 default (best at 0.80)
    Controls which dispreferred plans are included in DPO data; sensitivity shown in Figure 6(c).
  • DPO coefficient beta = 0.1
    Controls divergence from the reference model; sensitivity shown in Figure 6(d).
  • QIT and QDPO learning rates = 2e-4 and 5e-6
    Chosen by hand; no search reported.
  • QIT and QDPO training steps = 600 and 200
    Chosen by hand; no search reported.
  • train/test split ratio = 80/20
    Random split for queried workloads; affects all reported generalization estimates.
assumptions (4)
  • domain assumption Oracle and DB2 execution plans can be faithfully transformed into PostgreSQL physical plans via pg_hint_plan without losing their performance characteristics
    Required by the evaluation in Section 7.1 to compare all baselines on PostgreSQL's engine; conversion details are not provided.
  • domain assumption Execution time after cold start (clearing PostgreSQL shared buffers and Linux buffer cache) is a stable and sufficient measure of plan quality
    Used to label preference data and evaluate all plans in Section 7.1; no repeated runs or error bars are reported.
  • domain assumption The synthetic query workloads, generated by uniform literal sampling per template, are representative of the workloads where the conclusions apply
    The query sets are generated by the authors in Section 7.1; templates with runtime over 300 seconds in both PostgreSQL and Oracle are excluded.
  • ad hoc to paper A one-shot demonstration with the same query template as the input is necessary and sufficient to keep plan validity high
    The paper states this was found in 'extensive trials' in Section 5.1 and uses it in the prompt; it also creates the OOD demonstration gap.

how reviews work

0 comments
Cite this review

Pith. "Pith review of Can Large Language Models Be Query Optimizer for Relational Databases?." pith.science (2026). https://pith.science/paper/PAHKPXTC

@misc{pith2026250205562,
  author       = {Pith},
  title        = {Pith review of: Can Large Language Models Be Query Optimizer for Relational Databases?},
  year         = {2026},
  howpublished = {\url{https://pith.science/paper/PAHKPXTC}},
  note         = {Machine review of arXiv:2502.05562}
}
read the original abstract

Query optimization, which finds the optimized execution plan for a given query, is a complex planning and decision-making problem within the exponentially growing plan space in database management systems (DBMS). Traditional optimizers heavily rely on a certain cost model constructed by various heuristics and empirical tuning, probably leading to generating suboptimal plans. Recent developments of Large Language Models (LLMs) have demonstrated their potential in solving complex planning and decision-making problems, such as arithmetic and programmatic tasks. In this paper, we try to explore the potential of LLMs in handling query optimization and propose a tentative LLM-based query optimizer dubbed LLM-QO, established on PostgreSQL's execution engine. In LLM-QO, we formulate query optimization in an autoregressive fashion which directly generates the execution plan without explicit plan enumeration. To investigate the essential input of LLM-QO, we design a customized data recipe named QInstruct to collect the training data from various optimizers and serialize the database's meta data, queries and corresponding plans into a textual format. Based on QInstruct, we implement a two-stage fine-tuning pipeline, Query Instruction Tuning (QIT) and Query Direct Preference Optimization (QDPO), to empower the capability of general-purpose LLMs in handling query optimization. In our experiments, LLM-QO can generate valid and high-quality plans and consistently outperforms both traditional and learned optimizers on three query workloads. Our findings verify that LLMs can be derived as query optimizers where generalization, efficiency and adaptivity deserve further research efforts.

Figures

Figures reproduced from arXiv: 2502.05562 by the authors.

Figure 1
Figure 1. The Framework and Performance of LLM-QO Despite the fascinating envison, deriving LLMs to serve as a query optimizer faces multiple intertwined challenges. In the con￾text of generative AI, query optimization task should shift from the ‘plan enumerate and search’ paradigm to an ‘autoregressive generation’ paradigm. This is a completely new task for general￾purpose LLMs since unlike existing optimizers, they are unaw… view at source ↗
Figure 2
Figure 2. The overview of LLM-QO, which consists of: (a) QInstruct and the data preparing pipeline, (b)The training pipeline for LLMs, and (c) The inference pipeline. HashJoin movie_info_idx HashJoin movie_companies title (a) Physical Plan Step1: [movie_companies, title, HashJoin ] Step2: [movie_info_idx, HashJoin (movie_companies title), HashJoin ] (b) The Planning Path HashJoin (movie_info_idx HashJoin (movie_companies titl… view at source ↗
Figure 3
Figure 3. A plan with two textual representations 5.1 QInstruct Preparation For a SQL query in the training workload, LLM-QO generates its data recipe for the two-stage training, which is conducted offline. To start with, we present the formulation of the prompt of LLM-QO, which is composed of the input prompt and a response, as shown in [PITH_FULL_IMAGE:figures/full_fig_p005_3.png] view at source ↗
Figures from the paper (7 more)
Figure 4
Figure 4. Figure 4: The format of QInstruct we encourage the LLM to generate a plan by explicit instruction ‘think step by step’ [26]. Considering different LLMs support differ￾ent maximum length of input tokens, users can further enrich the [PITH_FULL_IMAGE:figures/full_fig_p005_4.png]
Figure 2
Figure 2. Figure 2: To be more specific, the first stage, called Query Instruction [PITH_FULL_IMAGE:figures/full_fig_p007_2.png]
Figure 5
Figure 5. Figure 5: Preference Adaption on DSB we observe that LLM-QO (Qdpo) + achieves the overall best per￾formance across all LLM-QOs. In comparison to LLM-QO (Qit), LLM-QO (Qdpo) and LLM-QO (Qdpo) + significantly reduce the execution time on templates tpl018, tpl019, and tpl040, and a…
Figure 6
Figure 6. Figure 6: The impact of training data scale, 𝑟0, and 𝛽 on DSB [PITH_FULL_IMAGE:figures/full_fig_p011_6.png]
Figure 7
Figure 7. Figure 7: Visualization of plans from PostgreSQL, Oracle, LLM-QO (Qit), LLM-QO (Qdpo) on a query of IMDB NestLoopJoin NestLoopJoin HashJoin HashJoin catalog_sales data_dim catalog_returns warehouse item (a) PostgreSQL (time=4.49s, cost=342.56) HashJoin HashJoin HashJoin date_dim…
Figure 8
Figure 8. Figure 8: Visualization of plans from PostgreSQL, Oracle, LLM-QO (Qit), LLM-QO (Qdpo) on a query of DSB 1 16 32 64 0.2 0.8 3.2 12.8 batch size Inference Time (sec) H100 IMDB A100 IMDB H100 JOB-light A100 JOB-light H100 DSB A100 DSB [PITH_FULL_IMAGE:figures/full_fig_p012_8.png]
Figure 9
Figure 9. Figure 9: The average inference time on three query sets [PITH_FULL_IMAGE:figures/full_fig_p012_9.png]

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 4 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. ReSequel: Robust LLM-assisted Query Rewriting and Optimization using Templatization and Sampling

    cs.DB 2026-06 conditional novelty 7.0 of 10

    ReSequel uses LLMs guided by metadata-derived templates and sampling-based verification to rewrite SQL queries, delivering up to 16x workload speedups over native DBMSs and 22x over prior LLM baselines across eight be...

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

    cs.DB 2025-08 unverdicted novelty 5.0 of 10

    SEFRQO claims a self-evolving fine-tuned LLM with retrieval and execution feedback reduces query latency versus PostgreSQL, but the provided body is a different paper, blocking verification.

  3. Training-Free Query Optimization via LLM-Based Plan Similarity

    cs.DB 2025-06 conditional novelty 5.0 of 10

    LLM-PM, a training-free system that transfers optimizer hints from nearest-neighbour LLM plan embeddings, reports a 21.1% total runtime reduction on JOB-CEB over openGauss.

  4. A Survey of LLM $\times$ DATA

    cs.DB 2025-05 conditional novelty 5.0 of 10

    A comprehensive survey of the bidirectional links between LLMs and data management, organized as DATA4LLM and LLM4DATA with a new 'IaaS' data-quality framework.

Reference graph

Works this paper leans on

71 extracted references · 38 canonical work pages · cited by 4 Pith papers

  1. [1]

    Nippon telegraph and telephone corporation

    [n.d.]. Nippon telegraph and telephone corporation. https://pghintplan.osdn.jp/ pg_hint_plan.html

  2. [2]

    [n.d.]. Pytorch. https://github.com/pytorch/pytorch

  3. [3]

    [n.d.]. Unsloth. https://github.com/unslothai/unsloth

  4. [4]

    Ebtesam Almazrouei, Hamza Alobeidli, Abdulaziz Alshamsi, Alessandro Cap- pelli, Ruxandra Cojocaru, Mérouane Debbah, Étienne Goffinet, Daniel Hesslow, Julien Launay, Quentin Malartic, Daniele Mazzotta, Badreddine Noune, Baptiste Pannier, and Guilherme Penedo. 2023. The Falcon Series of Open Language Models. CoRR abs/2311.16867 (2023). https://doi.org/10.48...

  5. [5]

    Simran Arora, Brandon Yang, Sabri Eyuboglu, Avanika Narayan, Andrew Hojel, Immanuel Trummer, and Christopher Ré. 2023. Language Models Enable Simple Systems for Generating Structured Views of Heterogeneous Data Lakes. Proc. VLDB Endow. 17, 2 (2023), 92–105. https://www.vldb.org/pvldb/vol17/p92-arora. pdf

  6. [6]

    Surajit Chaudhuri. 1998. An Overview of Query Optimization in Relational Systems. In Proc. PODS, Alberto O. Mendelzon and Jan Paredaens (Eds.). ACM Press, 34–43. https://doi.org/10.1145/275487.275492

  7. [7]

    Daoyuan Chen, Yilun Huang, Zhijian Ma, Hesen Chen, Xuchen Pan, Ce Ge, Dawei Gao, Yuexiang Xie, Zhaoyang Liu, Jinyang Gao, Yaliang Li, Bolin Ding, and Jingren Zhou. 2024. Data-Juicer: A One-Stop Data Processing System for Large Language Models. In Companion of the 2024 International Conference on Management of Data, SIGMOD/PODS 2024, Santiago AA, Chile, Ju...

  8. [8]

    Hao Chen, Yiming Zhang, Qi Zhang, Hantao Yang, Xiaomeng Hu, Xuetao Ma, Yi- fan Yanggong, and Junbo Zhao. 2023. Maybe Only 0.5% Data is Needed: A Prelimi- nary Exploration of Low Training Data Instruction Tuning.CoRR abs/2305.09246 (2023). https://doi.org/10.48550/ARXIV.2305.09246 arXiv:2305.09246

Show all 71 references
  1. [9]

    Jin Chen, Guanyu Ye, Yan Zhao, Shuncheng Liu, Liwei Deng, Xu Chen, Rui Zhou, and Kai Zheng. 2022. Efficient Join Order Selection Learning with Graph-based Representation. In Proc. KDD. ACM, 97–107. https://doi.org/10.1145/3534678. 3539303

  2. [10]

    Bailu Ding, Surajit Chaudhuri, Johannes Gehrke, and Vivek Narasayya. 2021. DSB: A decision support benchmark for workload-driven and traditional database systems. Proceedings of the VLDB Endowment 14, 13 (2021), 3376–3388

  3. [11]

    Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ah- mad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Amy Yang, Angela Fan, Anirudh Goyal, Anthony Hartshorn, Aobo Yang, Archi Mitra, Archie Sra- vankumar, Artem Korenev, Arthur Hinsvark, Arun Rao, Aston...

  4. [12]

    Hashimoto

    Yann Dubois, Chen Xuechen Li, Rohan Taori, Tianyi Zhang, Ishaan Gulrajani, Jimmy Ba, Carlos Guestrin, Percy Liang, and Tatsunori B. Hashimoto. 2023. AlpacaFarm: A Simulation Framework for Methods that Learn from Human Feedback. In Proc. NeurIPS. http://papers.nips.cc/paper_fil...

  5. [13]

    1994.Query Processing for Advanced Database Systems

    Johann Christoph Freytag, David Maier, and Gottfried Vossen (Eds.). 1994.Query Processing for Advanced Database Systems . Morgan Kaufmann

  6. [14]

    Victor Giannakouris and Immanuel Trummer. 2024. Demonstrating 𝜆-Tune: Exploiting Large Language Models for Workload-Adaptive Database System Tuning. In Companion of SIGMOD/PODS . ACM, 508–511. https://doi.org/10. 1145/3626246.3654751

  7. [15]

    Goetz Graefe. 1993. Query Evaluation Techniques for Large Databases. ACM Comput. Surv. 25, 2 (1993), 73–170. https://doi.org/10.1145/152610.152611

  8. [16]

    Goetz Graefe, Ann Linville, and Leonard D. Shapiro. 1994. Sort vs. hash revisited. IEEE Transactions on Knowledge and Data Engineering 6, 6 (1994), 934–944

  9. [17]

    Ari Holtzman, Jan Buys, Li Du, Maxwell Forbes, and Yejin Choi. 2020. The Curious Case of Neural Text Degeneration. In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020 . OpenReview.net. https://openreview.net/forum?id...

  10. [18]

    Zijin Hong, Zheng Yuan, Qinggang Zhang, Hao Chen, Junnan Dong, Feiran Huang, and Xiao Huang. 2024. Next-Generation Database Interfaces: A Survey of LLM-based Text-to-SQL. CoRR abs/2406.08426 (2024). https://doi.org/10. 48550/ARXIV.2406.08426 arXiv:2406.08426

  11. [19]

    Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen

    Edward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. 2022. LoRA: Low-Rank Adaptation of Large Language Models. InProc. ICLR. OpenReview.net. https://openreview.net/forum? id=nZeVKeeFYf9

  12. [20]

    Ahmed Hussein, Mohamed Medhat Gaber, Eyad Elyan, and Chrisina Jayne. 2017. Imitation Learning: A Survey of Learning Methods. ACM Comput. Surv. 50, 2 (2017), 21:1–21:35. https://doi.org/10.1145/3054912

  13. [21]

    Matthias Jarke and Jürgen Koch. 1984. Query Optimization in Database Systems. ACM Comput. Surv. 16, 2 (1984), 111–152. https://doi.org/10.1145/356924.356928

  14. [22]

    Albert Q Jiang, Alexandre Sablayrolles, Arthur Mensch, Chris Bamford, De- vendra Singh Chaplot, Diego de las Casas, Florian Bressand, Gianna Lengyel, Guillaume Lample, Lucile Saulnier, et al . 2023. Mistral 7B. arXiv preprint arXiv:2310.06825 (2023)

  15. [23]

    Albert Q. Jiang, Alexandre Sablayrolles, Arthur Mensch, Chris Bamford, De- vendra Singh Chaplot, Diego de Las Casas, Florian Bressand, Gianna Lengyel, Guillaume Lample, Lucile Saulnier, Lélio Renard Lavaud, Marie-Anne Lachaux, Pierre Stock, Teven Le Scao, Thibaut Lavril, Thoma...

  16. [24]

    Juyong Jiang, Fan Wang, Jiasi Shen, Sungju Kim, and Sunghun Kim. 2024. A Survey on Large Language Models for Code Generation. arXiv:2406.00515 [cs.CL] https://arxiv.org/abs/2406.00515

  17. [25]

    Reiner, and Don S

    Won Kim, David S. Reiner, and Don S. Batory (Eds.). 1985. Query Processing in Database Systems. Springer

  18. [26]

    Takeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo, and Yusuke Iwasawa. 2022. Large Language Models are Zero-Shot Reasoners. In Proc. NeurIPS, Sanmi Koyejo, S. Mohamed, A. Agarwal, Danielle Belgrave, K. Cho, and A. Oh (Eds.). http://papers.nips.cc/paper_files/paper/...

  19. [27]

    Hellerstein, and Ion Stoica

    Sanjay Krishnan, Zongheng Yang, Ken Goldberg, Joseph M. Hellerstein, and Ion Stoica. 2018. Learning to Optimize Join Queries With Deep Reinforcement Learning. CoRR abs/1808.03196 (2018). arXiv:1808.03196 http://arxiv.org/abs/ 1808.03196

  20. [28]

    Jiale Lao, Yibo Wang, Yufei Li, Jianping Wang, Yunjia Zhang, Zhiyuan Cheng, Wanghu Chen, Mingjie Tang, and Jianguo Wang. 2024. GPTuner: A Manual- Reading Database Tuning System via GPT-Guided Bayesian Optimization. Proc. VLDB Endow. 17, 8 (2024), 1939–1952. https://www.vldb.or...

  21. [29]

    Boncz, Alfons Kemper, and Thomas Neumann

    Viktor Leis, Andrey Gubichev, Atanas Mirchev, Peter A. Boncz, Alfons Kemper, and Thomas Neumann. 2015. How Good Are Query Optimizers, Really? Proc. VLDB 9, 3 (2015), 204–215. https://doi.org/10.14778/2850583.2850594

  22. [30]

    Viktor Leis, Bernhard Radke, Andrey Gubichev, Atanas Mirchev, Peter Boncz, Alfons Kemper, and Thomas Neumann. 2018. Query optimization through the looking glass, and what we found running the join order benchmark. The VLDB Journal 27 (2018), 643–668

  23. [31]

    Yaniv Leviathan, Matan Kalman, and Yossi Matias. 2023. Fast Inference from Transformers via Speculative Decoding. In Proc. ICML (Proceedings of Machine Learning Research), Vol. 202. PMLR, 19274–19286. https://proceedings.mlr.press/ v202/leviathan23a.html

  24. [32]

    Jinyang Li, Binyuan Hui, Ge Qu, Jiaxi Yang, Binhua Li, Bowen Li, Bailin Wang, Bowen Qin, Ruiying Geng, Nan Huo, Xuanhe Zhou, Chen- hao Ma, Guoliang Li, Kevin Chen-Chuan Chang, Fei Huang, Reynold Cheng, and Yongbin Li. 2023. Can LLM Already Serve as A Data- base Interface? A BI...

  25. [33]

    Peng Li, Yeye He, Dror Yashar, Weiwei Cui, Song Ge, Haidong Zhang, Danielle Rifinski Fainman, Dongmei Zhang, and Surajit Chaudhuri. 2024. Table- GPT: Table Fine-tuned GPT for Diverse Table Tasks. Proc. ACM Manag. Data 2, 3 (2024), 176. https://doi.org/10.1145/3654979

  26. [34]

    Zhaodonghui Li, Haitao Yuan, Huiming Wang, Gao Cong, and Lidong Bing. 2024. LLM-R2: A Large Language Model Enhanced Rule-based Rewrite System for Boosting Query Efficiency. CoRR abs/2404.12872 (2024). https://doi.org/10.48550/ ARXIV.2404.12872 arXiv:2404.12872

  27. [35]

    Ilya Loshchilov and Frank Hutter. 2019. Decoupled Weight Decay Regularization. In Proc. ICLR. OpenReview.net. https://openreview.net/forum?id=Bkg6RiCqY7

  28. [36]

    Ryan Marcus, Parimarjan Negi, Hongzi Mao, Nesime Tatbul, Mohammad Al- izadeh, and Tim Kraska. 2021. Bao: Making Learned Query Optimization Practical. In Proc. SIGMOD. ACM, 1275–1288. https://doi.org/10.1145/3448016.3452838

  29. [37]

    Ryan Marcus, Parimarjan Negi, Hongzi Mao, Chi Zhang, Mohammad Alizadeh, Tim Kraska, Olga Papaemmanouil, and Nesime Tatbul. 2019. Neo: A Learned Query Optimizer. Proc. VLDB Endow. 12, 11 (2019), 1705–1718. https://doi.org/ 10.14778/3342263.3342644

  30. [38]

    Sewon Min, Xinxi Lyu, Ari Holtzman, Mikel Artetxe, Mike Lewis, Hannaneh Hajishirzi, and Luke Zettlemoyer. 2022. Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?. In Proc. EMNLP. Association for Com- putational Linguistics, 11048–11064. https://doi.or...

  31. [39]

    Lili Mou, Ge Li, Lu Zhang, Tao Wang, and Zhi Jin. 2016. Convolutional Neural Networks over Tree Structures for Programming Language Processing. In Proc. AAAI. AAAI Press, 1287–1293. https://doi.org/10.1609/AAAI.V30I1.10139

  32. [40]

    OpenAI, :, Aaron Jaech, Adam Kalai, Adam Lerer, Adam Richardson, Ahmed El-Kishky, Aiden Low, Alec Helyar, Aleksander Madry, Alex Beutel, Alex Carney, Alex Iftimie, Alex Karpenko, Alex Tachard Passos, Alexander Neitz, Alexan- der Prokofiev, Alexander Wei, Allison Tam, Ally Benn...

  33. [41]

    OpenAI. 2023. GPT-4 Technical Report. CoRR abs/2303.08774 (2023). https: //doi.org/10.48550/ARXIV.2303.08774 arXiv:2303.08774

  34. [42]

    Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll L. Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, John Schulman, Jacob Hilton, Fraser Kelton, Luke Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul F. Christiano, Jan Leik...

  35. [43]

    Guilherme Penedo, Quentin Malartic, Daniel Hesslow, Ruxandra Co- jocaru, Hamza Alobeidli, Alessandro Cappelli, Baptiste Pannier, Ebte- sam Almazrouei, and Julien Launay. 2023. The RefinedWeb Dataset for Falcon LLM: Outperforming Curated Corpora with Web Data Only. In Proc. Neu...

  36. [44]

    Meikel Poess, Bryan Smith, Lubor Kollar, and Paul Larson. 2002. Tpc-ds, taking decision support benchmarking to the next level. In Proceedings of the 2002 ACM SIGMOD international conference on Management of data . 582–587

  37. [45]

    Man- ning, Stefano Ermon, and Chelsea Finn

    Rafael Rafailov, Archit Sharma, Eric Mitchell, Christopher D. Man- ning, Stefano Ermon, and Chelsea Finn. 2023. Direct Preference Optimization: Your Language Model is Secretly a Reward Model. In Proc. NeurIPS . http://papers.nips.cc/paper_files/paper/2023/hash/ a85b405ed65c647...

  38. [46]

    Baptiste Roziere, Jonas Gehring, Fabian Gloeckle, Sten Sootla, Itai Gat, Xiao- qing Ellen Tan, Yossi Adi, Jingyu Liu, Tal Remez, Jérémy Rapin, et al. 2023. Code llama: Open foundation models for code. arXiv preprint arXiv:2308.12950 (2023)

  39. [47]

    Selinger, Morton M

    Patricia G. Selinger, Morton M. Astrahan, Donald D. Chamberlin, Raymond A. Lorie, and Thomas G. Price. 1979. Access Path Selection in a Relational Database Management System. In Proc. SIGMOD, Philip A. Bernstein (Ed.). ACM, 23–34. https://doi.org/10.1145/582095.582099

  40. [48]

    David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneer- shelvam, Marc Lanctot, et al. 2016. Mastering the game of Go with deep neural networks and tree search. nature 529, 7587 (20...

  41. [49]

    Ziegler, Ryan Lowe, Chelsea Voss, Alec Radford, Dario Amodei, and Paul F

    Nisan Stiennon, Long Ouyang, Jeffrey Wu, Daniel M. Ziegler, Ryan Lowe, Chelsea Voss, Alec Radford, Dario Amodei, and Paul F. Christiano. 2020. Learning to summarize with human feedback. In Proc. NeurIPS. https://proceedings.neurips. cc/paper/2020/hash/1f89885d556929e98d3ef9b86...

  42. [50]

    Yuan Sui, Mengyu Zhou, Mingjie Zhou, Shi Han, and Dongmei Zhang. 2024. Table Meets LLM: Can Large Language Models Understand Structured Table Data? A Benchmark and Empirical Study. In Proc. WSDM. ACM, 645–654. https: //doi.org/10.1145/3616855.3635752

  43. [51]

    Arik, Hootan Nakhost, Hanjun Dai, Rajarishi Sinha, Pengcheng Yin, and Tomas Pfister

    Ruoxi Sun, Sercan Ö. Arik, Hootan Nakhost, Hanjun Dai, Rajarishi Sinha, Pengcheng Yin, and Tomas Pfister. 2023. SQL-PaLM: Improved Large Lan- guage Model Adaptation for Text-to-SQL. CoRR abs/2306.00739 (2023). https: //doi.org/10.48550/ARXIV.2306.00739 arXiv:2306.00739

  44. [52]

    Kai Sheng Tai, Richard Socher, and Christopher D. Manning. 2015. Improved Semantic Representations From Tree-Structured Long Short-Term Memory Net- works. In Proceedings of the 53rd Annual Meeting of the Association for Computa- tional Linguistics and the 7th International Joi...

  45. [53]

    Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, Aurélien Rodriguez, Armand Joulin, Edouard Grave, and Guil- laume Lample. 2023. LLaMA: Open and Efficient Foundation ...

  46. [54]

    Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yas- mine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhos- ale, et al. 2023. Llama 2: Open foundation and fine-tuned chat models, 2023. URL https://arxiv. org/abs/2307.09288 (2023)

  47. [55]

    Immanuel Trummer. 2023. Demonstrating GPT-DB: Generating Query-Specific and Customizable Code for SQL Processing with GPT-4. Proc. VLDB Endow. 16, 12 (2023), 4098–4101. https://doi.org/10.14778/3611540.3611630

  48. [56]

    Matthias Urban and Carsten Binnig. 2024. CAESURA: Language Models as Multi- Modal Query Planners. In Proc. CIDR. www.cidrdb.org. https://www.cidrdb.org/ cidr2024/papers/p14-urban.pdf

  49. [57]

    Gomez, Lukasz Kaiser, and Illia Polosukhin

    Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is All you Need. In Proc. NIPS. 5998–6008. https://proceedings.neurips.cc/paper/2017/ hash/3f5ee243547dee91fbd053c1c4a845aa-Abstract.html

  50. [58]

    Smith, Iz Beltagy, and Hannaneh Hajishirzi

    Yizhong Wang, Hamish Ivison, Pradeep Dasigi, Jack Hessel, Tushar Khot, Khyathi Raghavi Chandu, David Wadden, Kelsey MacMillan, Noah A. Smith, Iz Beltagy, and Hannaneh Hajishirzi. 2023. How Far Can Camels Go? Exploring the State of Instruction Tuning on Open Resources. In Proc....

  51. [59]

    Zhao, Kelvin Guu, Adams Wei Yu, Brian Lester, Nan Du, Andrew M

    Jason Wei, Maarten Bosma, Vincent Y. Zhao, Kelvin Guu, Adams Wei Yu, Brian Lester, Nan Du, Andrew M. Dai, and Quoc V. Le. 2022. Finetuned Lan- guage Models are Zero-Shot Learners. In Proc. ICLR. OpenReview.net. https: //openreview.net/forum?id=gEZrGCozdqR

  52. [60]

    Chi, Tatsunori Hashimoto, Oriol Vinyals, Percy Liang, Jeff Dean, and William Fedus

    Jason Wei, Yi Tay, Rishi Bommasani, Colin Raffel, Barret Zoph, Sebastian Borgeaud, Dani Yogatama, Maarten Bosma, Denny Zhou, Donald Metzler, Ed H. Chi, Tatsunori Hashimoto, Oriol Vinyals, Percy Liang, Jeff Dean, and William Fedus. 2022. Emergent Abilities of Large Language Mod...

  53. [61]

    Yang Wu, Yao Wan, Hongyu Zhang, Yulei Sui, Wucai Wei, Wei Zhao, Guandong Xu, and Hai Jin. 2024. Automated Data Visualization from Natural Language via Large Language Models: An Exploratory Study. Proc. ACM Manag. Data 2, 3 (2024), 115. https://doi.org/10.1145/3654992

  54. [62]

    Siqiao Xue, Caigao Jiang, Wenhui Shi, Fangyin Cheng, Keting Chen, Hongjun Yang, Zhiping Zhang, Jianshan He, Hongyang Zhang, Ganglin Wei, Wang Zhao, Fan Zhou, Danrui Qi, Hong Yi, Shaodong Liu, and Faqiang Chen. 2023. DB- GPT: Empowering Database Interactions with Private Large ...

  55. [63]

    Zongheng Yang, Wei-Lin Chiang, Sifei Luan, Gautam Mittal, Michael Luo, and Ion Stoica. 2022. Balsa: Learning a Query Optimizer Without Expert Demonstrations. In Proc. SIGMOD. ACM, 931–944. https://doi.org/10.1145/3514221.3517885

  56. [64]

    Xiang Yu, Chengliang Chai, Guoliang Li, and Jiabin Liu. 2022. Cost-based or Learning-based? A Hybrid Query Optimizer for Query Plan Selection. Proc. VLDB Endow. 15, 13 (2022), 3924–3936. https://doi.org/10.14778/3565838.3565846

  57. [65]

    Xiang Yu, Guoliang Li, Chengliang Chai, and Nan Tang. 2020. Reinforcement Learning with Tree-LSTM for Join Order Selection. In Proc. ICDE. IEEE, 1297–

  58. [66]

    Diab, Xian Li, Xi Victoria Lin, Todor Mihaylov, Myle Ott, Sam Shleifer, Kurt Shuster, Daniel Simig, Punit Singh Koura, Anjali Sridhar, Tianlu Wang, and Luke Zettlemoyer

    Susan Zhang, Stephen Roller, Naman Goyal, Mikel Artetxe, Moya Chen, Shuohui Chen, Christopher Dewan, Mona T. Diab, Xian Li, Xi Victoria Lin, Todor Mihaylov, Myle Ott, Sam Shleifer, Kurt Shuster, Daniel Simig, Punit Singh Koura, Anjali Sridhar, Tianlu Wang, and Luke Zettlemoyer...

  59. [67]

    Wayne Xin Zhao, Kun Zhou, Junyi Li, Tianyi Tang, Xiaolei Wang, Yupeng Hou, Yingqian Min, Beichen Zhang, Junjie Zhang, Zican Dong, Yifan Du, Chen Yang, Yushuo Chen, Zhipeng Chen, Jinhao Jiang, Ruiyang Ren, Yifan Li, Xinyu Tang, Zikang Liu, Peiyu Liu, Jian-Yun Nie, and Ji-Rong W...

  60. [68]

    Rong Zhu, Wei Chen, Bolin Ding, Xingguang Chen, Andreas Pfadler, Ziniu Wu, and Jingren Zhou. 2023. Lero: A Learning-to-Rank Query Optimizer. Proc. VLDB Endow. 16, 6 (2023), 1466–1479. https://doi.org/10.14778/3583140.3583160

  61. [69]

    Ziegler, Nisan Stiennon, Jeffrey Wu, Tom B

    Daniel M. Ziegler, Nisan Stiennon, Jeffrey Wu, Tom B. Brown, Alec Radford, Dario Amodei, Paul F. Christiano, and Geoffrey Irving. 2019. Fine-Tuning Language Models from Human Preferences. CoRR abs/1909.08593 (2019). arXiv:1909.08593 http://arxiv.org/abs/1909.08593

  62. [1308]

    https://doi.org/10.1109/ICDE48307.2020.00116

  63. [2022]

    Training language models to follow instructions with human feed- back. In Proc. NeurIPS . http://papers.nips.cc/paper_files/paper/2022/hash/ b1efde53be364a73914f58805a001731-Abstract-Conference.html

Pith tools

Reviewed August 8, 2026 · model on record in the stance chip above.