TL;DR
IDSTune is the first LLM-driven multi-agent framework that jointly tunes database knobs, indexes, and materialized views. By orchestrating specialized AI agents under a centralized supervisor, it successfully navigates cross-component interdependencies to deliver up to a 38% performance improvement and a 57% reduction in tuning time compared to state-of-the-art baselines.
What Problem Does This Paper Address?
Database system tuning is a notoriously complex challenge. To maximize performance, database administrators (DBAs) must optimize three distinct pillars: system-level parameters (knobs), data structures for fast retrieval (indexes), and precomputed query results (materialized views).
Historically, automated tuning tools have optimized these components either in complete isolation or in limited pairs (e.g., just knobs and indexes). However, these components are highly interdependent. For instance, aggressively increasing memory allocation (work_mem) while simultaneously materializing an intermediate view can inadvertently cause the database optimizer to abandon efficient index scans in favor of expensive hash joins.
As shown in Figure 1, naively combining separate state-of-the-art tuning tools can actually degrade database performance due to these conflicting optimizations. Furthermore, traditional machine learning approaches require hundreds of time-consuming workload replays, making them too slow and rigid for dynamic, real-world production environments.
Methods
IDSTune solves this by introducing an integrated, two-phase framework powered by large language model (LLM) collaboration:
- Phase I: Workload Compression: Feeding raw SQL queries directly into an LLM quickly exhausts token budgets and dilutes the model's attention. IDSTune instead extracts structured Query, Data, and System features. A specialized Selection Agent then filters these features down to a compact, task-relevant context tailored for downstream tuning.
- Phase II: Configuration Recommendation: IDSTune deploys a centralized multi-agent architecture. A team of Specialist Agents (each dedicated to either knobs, indexes, or materialized views) independently proposes candidate configurations based on the compressed workload. A Supervisor Agent then acts as the quality controller—consolidating the proposals into a single report, identifying cross-component conflicts or redundancies, and instructing specialists to iteratively refine their choices before deployment.
Additionally, the framework incorporates Safety Guardrails—a hybrid layer combining hard rule-based constraints with LLM semantic verification to catch risky parameter combinations that might prevent a database from starting up. It also features a Search Capability (based on the ReAct framework), allowing agents to query the web autonomously for up-to-date documentation when contextual confidence is low.
Datasets
The authors evaluated IDSTune across seven diverse benchmarks spanning different workloads and database engines:
- OLAP (Analytical): TPC-H (14 GB) and the Join Order Benchmark (JOB, 9 GB), which features highly complex multi-way joins.
- OLTP (Transactional): TPC-C (10 warehouses) and SYSBENCH (10 GB).
- Real-World Scenarios: SDSS (Sloan Digital Sky Survey, 16 GB), Birds (8 GB), and Redbench, a trace-driven benchmark used to simulate a week-long evolving production workload with severe data and query drift.
Key Insights and Ideas
- The Fallacy of Local Optima: Coordinated tuning is mandatory. Because database components interact non-linearly, combining separate locally optimal configurations frequently yields a globally suboptimal result.
- In-Context Iteration Beats Workload Replay: Traditional ML tuners evaluate configuration quality by running the actual workload on the database, which can take hours. IDSTune shifts much of this evaluation overhead into "in-context iteration," where agents debate and resolve conflicts textually before touching the database.
- Knobs as a Buffer Against Drift: Physical design structures like indexes and views are fragile; they can easily become invalid or expensive to maintain when data distributions shift. IDSTune leverages system knobs as a stabilizing performance buffer during periods of data drift.
Key Results
- Superior Efficiency: On the JOB benchmark, IDSTune achieved a 38.3% reduction in query latency compared to non-hybrid baselines.
- Rapid Convergence: IDSTune cut total tuning time by 56.9% compared to the most competitive baseline (AgentTune + HMAB), often finding the optimal configuration within just two optimization rounds.
- Robust Generalization: In the face of progressive data and query drift (simulated via Redbench), IDSTune was the only framework that consistently avoided negative optimization (performance regression) throughout the entire timeline.
- Cross-Engine Capability: Because it relies on LLM reasoning and on-demand web search rather than hardcoded database internals, IDSTune successfully optimized both PostgreSQL and Microsoft SQL Server out-of-the-box.
Limitations and Future Work
While IDSTune significantly reduces database execution overhead, it introduces LLM-related costs and inference latency. The framework's effectiveness is bound to the reasoning capabilities of the underlying model; using advanced models like Claude 4.7 yields better database performance but increases token expenses.
The authors note that as LLMs naturally become cheaper, faster, and more powerful, the efficiency and practicality of frameworks like IDSTune will scale proportionally, making them highly viable for large-scale, automated enterprise database administration.
Summary updated