Abstract
Index tuning is a critical but computationally expensive task in database management. Modern tuners often consume significant resources chasing marginal performance gains. This paper introduces Esc, an early-stopping checker designed to identify the point of diminishing returns in a tuning session. By leveraging mathematical bounds on workload costs and monitoring the Index Tuning Curve, Esc can reduce expensive query optimizer calls by up to 60% with minimal impact on final index quality.
Introduction
Database index tuning—the selection of an optimal set of indexes for a given workload—remains a significant performance bottleneck. State-of-the-art tuners rely on "what-if" calls to the query optimizer to estimate the cost of hypothetical configurations. While effective, these calls are expensive. Even budget-aware tuners, which operate under a fixed limit of optimizer calls, often spend a large portion of their budget on incremental improvements that offer little real-world value.
The authors identify a consistent pattern of "diminishing returns": tuners typically discover high-quality configurations early in the process but continue to execute thousands of additional "what-if" calls for negligible gains. The primary challenge is that the optimal configuration is unknown a priori, making it difficult to decide when to stop safely. Stopping too early risks missing significant performance boosts, while stopping too late wastes valuable compute resources.
The Esc Framework
Esc addresses this by providing a framework for safe early stopping through three core components:
- Workload-Level Bounds: Building on previous work (Wii), Esc derives lower and upper bounds for total workload costs. It employs a Simulated Greedy Search to estimate potential future achievements within the remaining budget. This allows the system to calculate the maximum possible "improvement loss" incurred by stopping immediately.
- Index Interaction Refinement: Traditional cost models often assume additive benefits from indexes. However, indexes frequently interact, sometimes becoming redundant. Esc uses a similarity-based approach, mapping indexes to feature vectors and using cosine similarity to account for these redundancies, thereby tightening the upper bounds.
- Smart Verification Schemes: To minimize the overhead of calculating these bounds, Esc monitors the Index Tuning Curve (ITC). It tracks the "Improvement Rate" and only triggers expensive bound checks when the curve exhibits concavity, signaling that progress is slowing down.
Experimental Evaluation
The researchers evaluated Esc across a variety of benchmarks and real-world workloads:
- Benchmarks: TPC-H (sf=10), TPC-DS (sf=10), and the Join Order Benchmark (JOB).
- Real-World Workloads: Real-D (a 587GB database with ~7,900 tables) and Real-M (a 26GB database with 474 tables).
Key Results and Insights
The evaluation demonstrated that Esc significantly improves tuning efficiency. On the TPC-H benchmark, Esc reduced "what-if" calls by approximately 60% when using a 5% improvement loss threshold. For more complex workloads like TPC-DS and Real-D, the reduction was around 25%. Crucially, the actual loss in improvement was almost always lower than the user-defined threshold, often near zero.
A key insight is that the rate of improvement (the derivative of the ITC) serves as a reliable signal for potential exit points. By focusing bound checks on periods of deceleration, Esc maintains negligible computational overhead. Furthermore, the use of structural similarity (shared columns) proved to be an effective proxy for complex index interactions, which are otherwise NP-hard to calculate exactly.
When integrated with a two-phase greedy search (TPG-Esc), the system matched or outperformed the industry-standard Microsoft Database Tuning Advisor (DTA) within the same time budget, highlighting its practical utility.
Limitations and Future Directions
While highly effective, Esc faces challenges in extremely large search spaces, such as TPC-DS (848 candidate indexes), where bounds converge more slowly. Additionally, the mathematical proofs for the bounds assume the cost function is monotonic and submodular. While these properties generally hold for database optimizers, rare "pathological" cases could theoretically lead to premature stopping. Future work includes tightening bounds for non-greedy algorithms like Monte Carlo Tree Search (MCTS) to further enhance Esc's versatility.
Conclusion
Esc provides a robust, low-overhead solution to the problem of diminishing returns in index tuning. By mathematically bounding potential gains, it allows database administrators to reclaim significant compute time without sacrificing the quality of their database configurations.
Summary updated