Budget-aware Index Tuning with Reinforcement Learning (Extended Version)
- Wentao Wu ,
- Chi Wang ,
- Tarique Siddiqui ,
- Junxiong Wang ,
- Vivek Narasayya ,
- Surajit Chaudhuri ,
- Phil Bernstein
ACM SIGMOD International Conference on Management of Data (SIGMOD 2022) |
Index tuning aims to find the optimal index configuration for an input workload. It is a resource-intensive task since it requires making multiple expensive “what-if” calls to the query optimizer to estimate the cost of a query given an index configuration without actually building the indexes. In this paper, we study the problem of budget-aware index tuning where the number of what-if calls allowed when searching for the optimal configuration during tuning is constrained. This problem is challenging as it requires addressing the trade-off between investing what-if calls on exploring new configurations versus exploiting a known promising configuration. We formulate budget-aware index tuning as a Markov decision process, and propose a solution based on Monte Carlo tree search, a classic reinforcement learning technology. Experimental evaluation on both standard industry benchmarks and real workloads shows that our solution can significantly outperform alternative budget-aware solutions in terms of the quality of the index configuration.