IP Library Granted Patent US 11,074,256
Granted Patent B2
US 11,074,256 · App. 16/003,227 · Granted Jul 27, 2021

Learning optimizer for shared cloud

Inventors: Alekh Jindal (Kirkland, WA); Hiren Patel (Bothell, WA); Saeed Amizadeh (Seattle, WA); Chenggang Wu (Berkeley, CA)
Assignee: Microsoft Technology Licensing, LLC
G06F16/24534G06F16/24545G06N3/08G06N5/003G06N5/022
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 11,074,256
App. No.
16/003,227
Granted
Jul 27, 2021
Kind
B2
Abstract

Described herein is a system and method for training cardinality models in which workload data is analyzed to extract and compute features of subgraphs of queries. Using a machine learning algorithm, the cardinality models are trained based on the features and actual runtime statistics included in the workload data. The trained cardinality models are stored. Further described herein is a system and method of predicting cardinality of subgraphs of a query. Features for the subgraphs of the query are extracted and computed. Cardinality models are retrieved based on the features of the subgraphs of the query. Cardinalities of the subgraphs of the query are predicted using the retrieved cardinality models. One of the subgraphs of the query is selected to be utilized for execution of the query based on the predicted cardinalities.

Claims (42)

1. A system, comprising:

at least one processor; and

a memory having computer-executable instructions stored thereupon which, when executed by the at least one processor, cause the system to:

analyze workload data to determine features of operator subgraphs of queries;

using a machine learning algorithm, train a particular cardinality model for a particular operator subgraph based at least on the features and actual runtime statistics included in the workload data for at least two different jobs that include different parameters or different data inputs, the particular operator subgraph comprising a sequence of operators that occurs in the at least two different jobs; and

store the particular cardinality model.

2. The system of claim 1 , wherein the extracted features comprise, for an occurrence of an individual operator subgraph in an individual job in the workload data, at least one of a job name of the individual job, a total cardinality of all inputs to the individual operator subgraph, a name of all input datasets to the individual operator subgraph, or one or more parameters in the individual operator subgraph.

3. The system of claim 1 , wherein the features comprise, for an occurrence of an individual operator subgraph in an individual job in the workload data, at least one of a normalized job name of the individual job, a square of an input cardinality of the individual operator subgraph, a square root of the input cardinality of the individual operator subgraph, a log of the input cardinality of the individual operator subgraph, or an average output row length.

4. The system of claim 1 , wherein the particular cardinality model is based on at least one of a linear regression algorithm, a Poisson regression algorithm, or a multi-layer perceptron neural network.

5. The system of claim 1 , the memory having further computer-executable instructions stored thereupon which, when executed by the processor, cause the system to:

store at least one of a priority level or a confidence level with the particular cardinality model.

6. The system of claim 1 , the memory having further computer-executable instructions stored thereupon which, when executed by the processor, cause the system to:

during training of another cardinality model for another operator subgraph, determine that the another operator subgraph is more computationally expensive than a full query plan and stop exploring join orders which involve that individual operator subgraph.

7. The system of claim 1 , the memory having further computer-executable instructions stored thereupon which, when executed by the processor, cause the system to:

during training of cardinality models for two equivalent operator subgraphs including the particular operator subgraph and another operator subgraph, select the particular operator subgraph for training based at least on a determination that the particular operator subgraph maximizes a number of new subgraphs observed relative to the another operator subgraph.

8. The system of claim 1 , the memory having further computer-executable instructions stored thereupon which, when executed by the processor, cause the system to:

predict a cardinality of the particular operator subgraph for a received query using the retrieved particular cardinality model; and

determine whether to utilize the particular operator subgraph for execution of the received query based on the predicted cardinality.

9. A method, comprising:

determining features for operator subgraphs that can be used to execute a query, each operator subgraph comprising a different sequence of two or more operators;

retrieving cardinality models for the operator subgraphs;

predicting cardinalities of the operator subgraphs for executing the query using the features and the cardinality models; and

selecting a particular operator subgraph to utilize for execution of the query based at least on the predicted cardinalities.

10. The method of claim 9 , further comprising:

executing the query using the particular operator subgraph.

11. The method of claim 9 , wherein the features reflect at least one of job names, input cardinality, input dataset names, or operator subgraph parameters.

12. The method of claim 9 , wherein the features reflect at least one of normalized job names, squares of input cardinalities, square roots of input cardinalities, logs of input cardinalities, or average row length outputs.

13. The method of claim 9 , wherein the cardinality models are based on at least one of a linear regression algorithm, a Poisson regression algorithm, or a multi-layer perceptron neural network.

14. The method of claim 9 , wherein at least one of a priority level or a confidence level is stored with the cardinality models and used when selecting the particular operator subgraph to utilize for execution of the query.

15. A computer storage media storing computer-readable instructions that, when executed, cause a computing device to:

analyze workload data to determine features of a plurality of operator subgraphs, each operator subgraph comprising a sequence of two or more operators;

using a machine learning algorithm, train cardinality models for the operator subgraphs based at least on the features and actual runtime statistics included in the workload data for jobs that include individual operator subgraphs of the plurality;

receive a query having particular operator subgraphs that can be used to execute the query;

retrieve respective cardinality models for the particular operator subgraphs;

predict cardinalities of the particular operator subgraphs using the respective cardinality models; and

select a specific operator subgraph of the particular operator subgraphs to utilize for execution of the query based at least on the predicted cardinalities.

16. The computer storage media of claim 15 , storing further computer-readable instructions that, when executed, cause the computing device to:

execute the query using the specific operator subgraph.

17. The computer storage media of claim 15 , wherein the features identify job names of individual jobs which involved execution of the individual operator subgraphs.

18. The computer storage media of claim 15 , wherein the features identify average row output length.

19. The computer storage media of claim 15 , wherein the cardinality models are based on at least one of a linear regression algorithm, a Poisson regression algorithm, or a multi-layer perceptron neural network.

20. The computer storage media of claim 15 , wherein at least one of a priority level or a confidence level is stored with the cardinality models and used when selecting the specific operator subgraph to utilize for execution of the query.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 8, 2018
From: AMIZADEH, SAEED; JINDAL, ALEKH; PATEL, HIREN; WU, CHENGGANG
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 046024/0264 →
Continuity (2)
Provisional Application 62650330 · Mar 30, 2018
Related Publication 20190303475A1 · Oct 3, 2019
Cited By (1)
US 12,596,713