IP Library › Granted Patent US 12,066,993
Granted Patent B2
US 12,066,993 · App. 17/832,274 · Granted Aug 20, 2024

Constraint-based index tuning in database management systems utilizing reinforcement learning

Inventors: Wentao Wu (Bellevue, WA); Chi Wang (Redmond, WA); Tarique Ashraf Siddiqui (Redmond, WA); Vivek Ravindranath Narasayya (Redmond, WA); Surajit Chaudhuri (Kirkland, WA)
Assignee: Microsoft Technology Licensing, LLC
G06F16/217G06F16/2246G06F16/2453
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,066,993
App. No.
17/832,274
Granted
Aug 20, 2024
Kind
B2
Abstract

The present disclosure relates to systems, methods, and computer-readable media for determining optimal index configurations for processing workloads in a database management system. For instance, an index configuration system can efficiently determine a subset of indexes for processing a workload utilizing one or more reinforcement learning models. For example, in various implementations, the index configuration system utilizes a Markov decision process and/or a Monte Carlo tree search model to determine an optimal subset of indexes for processing a workload in a manner that effectively utilizes computing device resources while also avoiding significant interference with customer workloads.

Claims (52)

1. A computer-implemented method for performing index tuning within a relational database system, comprising:

receiving, at an index tuner, a workload comprising a set of queries corresponding to one or more databases;

generating, by the index tuner, a set of candidate indexes based on the set of queries, wherein the set of candidate indexes comprises multiple candidate index combinations;

determining, by the index tuner, an index configuration from the set of candidate indexes by:

identifying a plurality of index configurations from the set of candidate indexes utilizing one or more reinforcement learning models;

determining workload computing costs for a subset of the plurality of index configurations based on a query optimizer and a predetermined threshold tuning constraint; and

selecting the index configuration from the plurality of index configurations based on the workload computing costs, wherein the index configuration comprises a subset of candidate indexes from the set of candidate indexes; and

providing the subset of candidate indexes in response to receiving the workload.

2. The computer-implemented method of claim 1 , wherein the one or more reinforcement learning models comprise a Markov decision process having state transitions, actions, and rewards.

3. The computer-implemented method of claim 2 , wherein the one or more reinforcement learning models further comprise a Monte Carlo tree search model that follows the state transitions of the Markov decision process to identify the plurality of index configurations from the set of candidate indexes.

4. The computer-implemented method of claim 1 , wherein the one or more reinforcement learning models utilize one or more selection policies to identify the index configuration from the plurality of index configurations.

5. The computer-implemented method of claim 4 , wherein the one or more selection policies comprise upper confidence bounds for search trees policy or an estimated action value proportional-based policy.

6. The computer-implemented method of claim 1 , wherein determining the workload computing costs for the subset of the plurality of index configurations comprises providing the subset of the plurality of index configurations to the query optimizer for what-if cost estimation calls, and wherein the what-if cost estimation calls are based on one or more queries in the set of queries and index configurations from the subset of the plurality of index configurations.

7. The computer-implemented method of claim 1 , wherein the predetermined threshold tuning constraint comprises a predetermined number of what-if calls to the query optimizer.

8. The computer-implemented method of claim 1 , wherein:

a first number of the plurality of index configurations is greater than the predetermined number of what-if calls of the predetermined threshold tuning constraint.

9. The computer-implemented method of claim 1 , wherein determining the workload computing costs for the subset of the plurality of index configurations comprises generating a computing costs allocation matrix comprising values corresponding to the plurality of index configurations.

10. The computer-implemented method of claim 9 , wherein the computing costs allocation matrix comprises rows based on the set of candidate indexes and columns based on the set of queries.

11. The computer-implemented method of claim 9 , wherein:

generating the computing costs allocation matrix further comprises determining additional workload computing costs values in the computing costs allocation matrix for additional index configurations in the plurality of index configurations;

the additional index configurations are not included in the subset of the plurality of index configurations; and

the additional index configurations are determined from the values corresponding to the subset of the plurality of index configurations.

12. The computer-implemented method of claim 10 , wherein generating the computing costs allocation matrix further comprises:

detecting a query in the computing costs allocation matrix having no values corresponding to the subset of the plurality of index configurations; and

populating intersecting entries in the computing costs allocation matrix between the query and the plurality of index configurations with null or default values.

13. The computer-implemented method of claim 9 , further comprising:

populating cells of the computing costs allocation matrix corresponding to the subset of the plurality of index configurations with a value of 1; and

wherein a sum of the cells in the computing costs allocation matrix equals the predetermined threshold tuning constraint on the number of “what if” calls.

14. A system for performing index tuning within one or more relational databases, the system comprising:

one or more databases;

an index tuner having candidate indexes and an index predetermined threshold tuning constraint, wherein the predetermined threshold tuning constraint comprises a predetermined number of what-if calls to the query optimizer;

a query optimizer that determines workload cost estimates based on queries and index configurations; and

a non-transitory computer memory comprising instructions that, when executed by at least one processor, cause the system to:

receive, at the index tuner, a workload comprising a set of queries corresponding to the one or more databases;

generate, by the index tuner, a set of candidate indexes from the candidate indexes based on the set of queries, wherein the set of candidate indexes comprises candidate index combinations;

determine, by the index tuner, an index configuration from the set of candidate indexes by:

identifying a plurality of index configurations from the set of candidate indexes utilizing one or more reinforcement learning models;

determining workload computing costs for a subset of the plurality of index configurations based on the query optimizer and the index predetermined threshold tuning constraint; and

selecting the index configuration from the plurality of index configurations based on the workload computing costs, wherein the index configuration comprises a subset of candidate indexes from the set of candidate indexes; and

provide the subset of candidate indexes in response to receiving the workload.

15. The system of claim 14 , wherein:

the one or more reinforcement learning models comprise a Markov decision process having state transitions, actions, and rewards; and

the one or more reinforcement learning models further comprise a Monte Carlo tree search model that follows the state transitions of the Markov decision process to identify the plurality of index configurations from the set of candidate indexes.

16. The system of claim 14 , wherein:

the one or more reinforcement learning models utilize one or more selection policies to identify the index configuration from the plurality of index configurations; and

the one or more selection policies comprise upper confidence bounds for search trees policy or an estimated action value proportional-based policy.

17. The system of claim 14 , wherein determining the workload computing costs for the subset of the plurality of index configurations comprises providing the subset of the plurality of index configurations to the query optimizer for what-if cost estimation calls, and wherein the what-if cost estimation calls are based on one or more queries in the set of queries and index configurations from the subset of the plurality of index configurations.

18. The system of claim 14 , wherein:

the index predetermined threshold tuning constraint comprises a predetermined number of what-if calls to the query optimizer;

a first number of the plurality of index configurations is greater than the predetermined number of what-if calls of the index predetermined threshold tuning constraint.

19. The system of claim 14 , wherein determining the workload computing costs for the subset of the plurality of index configurations comprises generating a computing costs allocation matrix comprising values corresponding to the plurality of index configurations.

20. The system of claim 19 , further comprising additional instructions that, when executed by the at least one processor, cause the system to populate cells of the computing costs allocation matrix corresponding to the subset of the plurality of index configurations with a value of one, wherein a sum of the cells in the computing costs allocation matrix equals the predetermined number of what-if calls of the index predetermined threshold tuning constraint.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 19, 2022
From: WU, WENTAO; WANG, CHI; SIDDIQUI, TARIQUE ASHRAF; NARASAYYA, VIVEK RAVINDRANATH; CHAUDHURI, SURAJIT
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 062145/0163 →
Continuity (2)
Provisional Application 63325538 · Mar 30, 2022
Related Publication 20230315702A1 · Oct 5, 2023