IP Library › Granted Patent US 12,572,537
Granted Patent B2
US 12,572,537 · App. 16/511,966 · Granted Mar 10, 2026

Learned resource consumption model for optimizing big data queries

Inventors: Tarique Ashraf Siddiqui (Champaign, IL); Alekh Jindal (Sammamish, WA); Shi Qiao (Bellevue, WA); Hiren S. Patel (Bothell, WA)
Assignee: MICROSOFT TECHNOLOGY LICENSING, LLC
G06F16/24542G06F16/211G06F16/2246G06N20/20
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,572,537
App. No.
16/511,966
Filed
Jul 15, 2019
Granted
Mar 10, 2026
Kind
B2
Art Unit
2156
USPC
706/10
Abstract

Methods, systems, apparatuses, and computer program products are provided for evaluating a resource consumption of a query. A logical operator representation of a query generated to be executed (e.g., obtained from a query generating entity) may be determined. The logical operator representation may be transformed to a plurality of different physical operator representations for executing the query. A plurality of resource consumption models may be applied to each of the physical operator representations to determine a resource consumption estimate for the physical operator representation. The resource consumption models may be trained in different manners based at least on a history of query executions, such that each model may have different granularity, coverage and/or accuracy characteristics in estimating a resource consumption of a query. Based on the determined resource consumption estimates for the physical operator representations, a particular one of the physical operator representations may be selected to execute the query.

Claims (36)

1 . A system for evaluating a resource consumption of a query, the system comprising:

one or more processors; and

one or more memory devices that store program code configured to be executed by the one or more processors, the program code configured to perform operations that comprise:

determining a logical operator representation of a query to be executed;

transforming the logical operator representation to two or more physical operator representations for executing the query, each physical operator representation corresponding to a query plan;

applying a plurality of machine learning-based resource consumption models trained based at least on a history of query executions to each of the physical operator representations to determine a resource consumption estimate of each of the physical operator representations, each of the plurality of machine learning-based resource consumption models being trained based on different physical operator tree characteristics; and

selecting a particular query plan to execute the query, the selected query plan corresponding to one of the physical operator representations based on the determined resource consumption estimates.

2 . The system of claim 1 , wherein the program code is further configured to perform operations that comprise selecting a partition count for each of the physical operator representations prior to the determining the resource consumption estimate of each of the physical operator representations, the partition count being selected based at least on a resource consumption estimate of a portion of each physical operator representation.

3 . The system of claim 1 , wherein each of the plurality of machine learning-based resource consumption models comprises a machine-learning model that is trained based at least on a feature set associated with the history of query executions, the feature set corresponding to each machine-learning model being weighted differently from one another.

4 . The system of claim 1 , wherein at least one machine learning-based resource consumption model of the plurality of machine learning-based resource consumption models is trained based at least on prior query executions that comprise a physical operator tree with a common schema as a physical operator tree of at least one of the physical operator representations.

5 . The system of claim 1 , wherein at least one machine learning-based resource consumption model of the plurality of machine learning-based resource consumption models is trained based at least on prior query executions that comprise a physical operator tree with a common root operator as a physical operator tree of at least one of the physical operator representations.

6 . The system of claim 1 , wherein at least one machine learning-based resource consumption model of the plurality of machine learning-based resource consumption models is trained based at least on prior query executions that comprise a physical operator tree with a common root operator, a common set of leaf node inputs, and a same number of total operators as a physical operator tree of at least one of the physical operator representations.

7 . The system of claim 1 , wherein at least one machine learning-based resource consumption model of the plurality of machine learning-based resource consumption models is trained based at least on prior query executions that comprise a physical operator tree with a common root operator, a common set of leaf node inputs, and a different number of total operators as a physical operator tree of at least one of the physical operator representations.

8 . The system of claim 1 , wherein the applying the plurality of machine learning-based resource consumption models comprises applying a combined model generated from the plurality of resource consumption models.

9 . The system of claim 8 , wherein the combined model is generated from a weighting of each of the plurality of machine learning-based resource consumption models.

10 . A computer-implemented method for evaluating a resource consumption of a query, the method comprising:

determining a logical operator representation of a query to be executed;

transforming the logical operator representation to two or more physical operator representations for executing the query, each physical operator representation corresponding to a query plan;

applying a plurality of machine learning-based resource consumption models trained based at least on a history of query executions to each of the physical operator representations to determine a resource consumption estimate of each of the physical operator representations, each of the plurality of machine learning-based resource consumption models being trained based on different physical operator tree characteristics; and

selecting a particular query plan to execute the query, the selected query plan corresponding to one of the physical operator representations based on the determined resource consumption estimates.

11 . The computer-implemented method of claim 10 , further comprising:

selecting a partition count for each of the physical operator representations prior to determining the resource consumption estimate of each of the physical operator representations, the partition count being selected based at least on a resource consumption estimate of a portion of each physical operator representation.

12 . The computer-implemented method of claim 10 , wherein each of the plurality of machine learning-based resource consumption models comprises a machine-learning model that is trained based at least on a feature set associated with the history of query executions, the feature set corresponding to each machine-learning model being weighted differently from one another.

13 . The computer-implemented method of claim 10 , wherein at least one machine learning-based resource consumption model of the plurality of machine learning-based resource consumption models is trained based at least on prior query executions that comprise a physical operator tree with a common schema as a physical operator tree of at least one of the physical operator representations.

14 . The computer-implemented method of claim 10 , wherein at least one machine learning-based resource consumption model of the plurality of machine learning- based resource consumption models is trained based at least on prior query executions that comprise a physical operator tree with a common root operator as a physical operator tree of at least one of the physical operator representations.

15 . The computer-implemented method of claim 10 , wherein the applying the plurality of machine learning-based resource consumption models comprises applying a combined model generated from the plurality of machine learning-based resource consumption models.

16 . A computer-readable memory having computer program code recorded thereon that when executed by at least one processor causes the at least one processor to perform a method comprising:

determining a logical operator representation of a query to be executed;

transforming the logical operator representation to two or more physical operator representations for executing the query, each physical operator representation corresponding to a query plan;

applying a plurality of machine learning-based resource consumption models trained based at least on a history of query executions to each of the physical operator representations to determine a resource consumption estimate of each of the physical operator representations, each of the plurality of machine learning-based resource consumption models being trained based on different physical operator tree characteristics; and

selecting a particular query plan to execute the query, the selected query plan corresponding to one of the physical operator representations based on the determined resource consumption estimates.

17 . The computer-readable memory of claim 16 , further comprising:

selecting a partition count for each of the physical operator representations prior to determining the resource consumption estimate of each of the physical operator representations, the partition count being selected based at least on a resource consumption estimate of a portion of each physical operator representation.

18 . The computer-readable memory of claim 16 , wherein each of the plurality of machine learning-based resource consumption models comprises a machine-learning model that is trained based at least on a feature set associated with the history of query executions, the feature set corresponding to each machine-learning model being weighted differently from one another.

19 . The computer-readable memory of claim 16 , wherein at least one machine learning-based resource consumption model of the plurality of machine learning-based resource consumption models is trained based at least on prior query executions that comprise a physical operator tree with a common schema as a physical operator tree of at least one of the physical operator representations.

20 . The computer-readable memory of claim 16 , wherein at least one machine learning-based resource consumption model of the plurality of machine learning-based resource consumption models is trained based at least on prior query executions that comprise a physical operator tree with a common root operator as a physical operator tree of at least one of the physical operator representations.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 16, 2019
From: SIDDIQUI, TARIQUE ASHRAF; JINDAL, ALEKH; QIAO, SHI; PATEL, HIREN S.
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 049767/0303 →
Continuity (2)
Provisional Application 62840897 · Apr 30, 2019
Related Publication 20200349161A1 · Nov 5, 2020
References Cited (74)
US 20110153593A1 · Zhou · 2011 [cited by applicant]
US 20140280159A1 · Cao · 2014 [cited by examiner]
US 20170126795A1 · Kumar · 2017 [cited by applicant]
US 20180060389A1 · Hwang · 2018 [cited by examiner]
US 20200097582A1 · Jedek · 2020 [cited by examiner]
US 20200285642A1 · Bei · 2020 [cited by examiner]
CN 104871154A · 2015 [cited by applicant]
“Apache Calcite”, Retrieved from: https://calcite.apache.org/, May 28, 2019, 2 Pages. [cited by applicant]
“Apache Flink”, Retrieved from : https://flink.apache.org/, May 28, 2019, 3 Pages. [cited by applicant]
“Apache Hive”, Retrieved from: https://hive.apache.org/, May 28, 2019, 2 Pages. [cited by applicant]
“Apache Spark”, Retrieved from: https://spark.apache.org/, May 28, 2019, 4 Pages. [cited by applicant]
Nick., “Asimov System”, Retrieved from: https://mywindowshub.com/microsoft-uses-real-time-telemetry-asimov-build-test-update-windows-9/, Sep. 29, 2014, 2 Pages. [cited by applicant]
“Azure Data Lake”, Retrieved from: https://azure.microsoft.com/en-in/solutions/data-lake/, May 28, 2019, 8 Pages. [cited by applicant]
“Azure SQL Database”, Retrieved from: https://azure.microsoft.com/en-us/services/sql-database/, May 28, 2019, 17 Pages. [cited by applicant]
“Google BigQuery”, Retrieved from https://cloud.google.com/bigquery, Retrieved On: Mar. 5, 2018, 20 Pages. [cited by applicant]
“IBM BigSQL”, Retrieved from: https://www.IBM.com/products/db2-big-sql, May 28, 2019, 6 Pages. [cited by applicant]
Agarwal, et al., “Re-optimizing Data-Parallel Computing”, In Proceedings of the 9th USENIX Symposium on Networked Systems Design and Implementation, Apr. 25, 2012, 14 Pages. [cited by applicant]
Agrawal, et al., “Automated Selection of Materialized Views and Indexes in SQL Databases”, In Proceedings of VLDB, Sep. 10, 2000, 10 Pages. [cited by applicant]
Agrawal, et al., “Integrating Vertical and Horizontal Partitioning into Automated Physical Database Design”, In Proceedings of the ACM SIGMOD International Conference on Management of Data, Jun. 13, 2004, pp. 359-370. [cited by applicant]
Akdere, et al., “Learning-Based Query Performance Modeling and Prediction”, In Proceedings of the IEEE 28th International Conference on Data Engineering, Apr. 1, 2012, pp. 390-401. [cited by applicant]
Alipourfard, et al., “Cherrypick: Adaptively Unearthing the Best Cloud Configurations for Big Data Analytics”, In 14th USENIX Symposium on Networked Systems Design and Implementation NSDI, 2017, pp. 469-482. [cited by applicant]
Bach, et al., “Kernel Independent Component Analysis”, In Journal of Machine Learning Research, vol. 03, Jul. 2002, 48 Pages. [cited by applicant]
Bruno, et al., “Continuous Cloud-Scale Query Optimization and Processing”, In Proceedings of the VLDB Endowment, vol. 6, Issue 11, Aug. 27, 2013, pp. 961-972. [cited by applicant]
Chaiken, et al., “SCOPE: Easy and Efficient Parallel Processing of Massive Data Sets”, In Proceedings of the VLDB Endowment, vol. 1, Issue 2, Aug. 1, 2008, pp. 1265-1276. [cited by applicant]
Chaudhuri, et al., “Estimating Progress of Execution for SQL Queries”, In Proceedings of the ACM SIGMOD International Conference on Management of Data, Jun. 13, 2014, pp. 803-814. [cited by applicant]
Chaudhuri, et al., “Self-tuning Database Systems: A Decade of Progress”, In Proceedings of 33rd International Conference on Very Large Data Bases, Sep. 23, 2007, pp. 3-14. [cited by applicant]
Curino, et al., “Schism: A Workload-Driven Approach to Database Replication and Partitioning”, In Proceedings of the VLDB Endowment, vol. 3, Issue 1-2, Sep. 1, 2010, 10 Pages. [cited by applicant]
Duan, et al., “Tuning Database Configuration Parameters with ituned”, In Proceedings of the VLDB Endowment, vol. 2, Issue 1, Aug. 1, 2009, pp. 1246-1257. [cited by applicant]
Ganapathi, et al., “Predicting Multiple Metrics for Queries: Better Decisions Enabled by Machine Learning”, In Proceedings of IEEE 25th International Conference on Data Engineering, Mar. 29, 2009, 12 Pages. [cited by applicant]
Graefe, Goetz, “The Cascades Framework for Query Optimization”, In IEEE Data Engineering Bulletin, vol. 18, Issue 3, Sep. 1995, pp. 19-29. [cited by applicant]
Gupta, et al., “Index Selection for OLAP”, In Proceedings 13th International Conference on Data Engineering, Apr. 7, 1997, 12 Pages. [cited by applicant]
Hara, et al., “Making Tree Ensembles Interpretable: A Bayesian Model Selection Approach”, In Proceedings of the Twenty-First International Conference on Artificial Intelligence and Statistics, vol. 84, Jun. 29, 2016, 21… [cited by applicant]
Ives, et al., “An Adaptive Query Execution System for Data Integration”, In Proceedings of the 1999 ACM SIGMOD International Conference on Management of Data, vol. 28, Issue 2, Jun. 1, 1999, pp. 299-310. [cited by applicant]
Jindal, et al., “Computation Reuse in Analytics Job Service at Microsoft”, In Proceedings of the 2018 International Conference on Management of Data, May 27, 2018, pp. 191-203. [cited by applicant]
Jindal, et al., “Selecting Subexpressions to Materialize at Datacenter Scale”, In Proceedings of the VLDB Endowment, vol. 11, Issue 7, Mar. 1, 2018, pp. 800-812. [cited by applicant]
Kraska, et al., “SageDB: A Learned Database System”, In Proceedings of CIDR, 2019, 10 Pages. [cited by applicant]
Kraska, et al., “The Case for Learned Index Structures”, In Proceedings of the International Conference on Management of Data, May 27, 2018, pp. 489-504. [cited by applicant]
Krishnan, et al., “Learning to Optimize Join Queries with Deep Reinforcement Learning”, In Proceedings of CoRR, abs/1808.03196, Aug. 9, 2018, 19 Pages. [cited by applicant]
Li, et al., “Robust Estimation of Resource Consumption for SQL Queries Using Statistical Techniques”, In Proceedings of the VLDB Endowment, vol. 5, Issue 11, Jul. 1, 2012, pp. 1555-1566. [cited by applicant]
Lohman, Guy, “SIGMOD Blog”, Retrieved from: http://wp.sigmod.org/?p=1075, Apr. 10, 2014, 10 Pages. [cited by applicant]
Luo, et al., “Toward a Progress Indicator for Database Queries”, In Proceedings of the ACM SIGMOD International Conference on Management of Data, Jun. 13, 2004, 12 Pages. [cited by applicant]
Marcus, et al., “Deep Reinforcement Learning for Join Order Enumeration”, In Proceedings of the First International Workshop on Exploiting Artificial Intelligence Techniques for Data Management, Jun. 10, 2018, 4 Pages. [cited by applicant]
Markl, et al., “Robust Query Processing through Progressive Optimization”, In Proceedings of the ACM SIGMOD International Conference on Management of Data, Jun. 13, 2004, 12 Pages. [cited by applicant]
Rajan, et al., “PerfOrator: Eloquent Performance Models for Resource Optimization”, In Proceedings of the Seventh ACM Symposium on Cloud Computing, Oct. 5, 2016, pp. 415-427. [cited by applicant]
Rao, et al., “Automating Physical Database Design in a Parallel Database”, In Proceedings of the ACM SIGMOD International Conference on Management of Data, Jun. 3, 2002, 12 Pages. [cited by applicant]
Schad, et al., “Runtime Measurements in the Cloud: Observing, Analyzing, and Reducing Variance”, In Proceedings of the VLDB Endowment, vol. 3, Issue 1-2, Sep. 1, 2010, 12 Pages. [cited by applicant]
Stillger, et al., “LEO-DB2's Learning Optimizer”, In Proceedings of VLDB, vol. 1, Sep. 11, 2001, 10 Pages. [cited by applicant]
Valentin, et al., “DB2 Advisor: An Optimizer Smart Enough to Recommend its Own Indexes”, In Proceedings of 16th International Conference on Data Engineering, 2000, 10 Pages. [cited by applicant]
Van Aken, et al., “Automatic Database Management System Tuning through Large-scale Machine Learning”, In Proceedings of the 2017 ACM International Conference on Management of Data, May 9, 2017, pp. 1009-1024. [cited by applicant]
Venkataraman, et al., “Ernest: Efficient Performance Prediction for Large-scale Advanced Analytics”, In Proceedings of 13th USENIX Symposium on Networked Systems Design and Implementation NSDI, 2016, pp. 363-378. [cited by applicant]
Viswanathan, et al., “Query and Resource Optimization: Bridging the Gap”, In Proceedings of IEEE 34th International Conference on Data Engineering, Apr. 16, 2018, 4 Pages. [cited by applicant]
Wu, et al., “Predicting Query Execution Time: Are Optimizer Cost Models Really Unusable?”, In Proceedings of IEEE 29th International Conference on Data Engineering, Apr. 8, 2013, 18 Pages. [cited by applicant]
Wu, et al., “Towards a Learning Optimizer for Shared Clouds”, In Proceedings of the VLDB Endowment, vol. 12, Issue 3, Nov. 1, 2018, pp. 210-222. [cited by applicant]
Zhou, et al., “Scope: Parallel Databases Meet MapReduce”, In the International Journal on Very Large Data Bases, vol. 21 Issue 5, Oct. 2012, pp. 611-636. [cited by applicant]
“International Search Report and Written Opinion Issued in PCT Application No. PCT/US20/026018”, Mailed Date: Jun. 26, 2020, 12 Pages. [cited by applicant]
“AWS Athena”, Retrieved from: https://aws.amazon.com/athena/, Retrieved Date: Oct. 3, 2019, 07 Pages. [cited by applicant]
“MART”, Retrieved from: http://statweb.stanford.edu/˜jhf/MART.html, Mar. 6, 2015, 01 Page. [cited by applicant]
“RxFastTrees: Fast Tree”, Retrieved from: https://docs.microsoft.com/en-us/machine-learning-server/r-reference/microsoftml/rxfasttrees, Jul. 15, 2019, 08 Pages. [cited by applicant]
Boutin, et al., “Apollo: Scalable and Coordinated Scheduling for Cloud-Scale Computing”, In Proceedings of the 11th USENIX conference on Operating Systems Design and Implementation, Oct. 6, 2014, pp. 285-300. [cited by applicant]
Bruno, et al., “Advanced Join Strategies for Large-Scale Distributed Computation”, In Journal of the VLDB Endowment, vol. 7, Issue 13, Aug. 1, 2014, pp. 1484-1495. [cited by applicant]
Dutt, et al., “Plan Bouquets: A Fragrant Approach to Robust Query Processing”, In Journal of ACM Transactions on Database Systems (TODS), vol. 41, Issue 2, Article No. 11, Jun. 30, 2016, 37 Pages. [cited by applicant]
Friedman, Jerome H., “Stochastic Gradient Boosting”, In Journal of Computational Statistics and Data Analysis, vol. 38, Issue 4, Feb. 28, 2002, 10 Pages. [cited by applicant]
Jyothi, et al., “Morpheus: Towards Automated SLOs for Enterprise Clusters”, In Proceedings of the 12th USENIX conference on Operating Systems Design and Implementation, Nov. 2, 2016, pp. 117-134. [cited by applicant]
Lee, et al., “Operator and Query Progress Estimation in Microsoft Sql Server Live Query Statistics”, In Proceedings of the International Conference on Management of Data, Jun. 26, 2016, pp. 1753-1764. [cited by applicant]
Marcus, et al., “Neo: A Learned Query Optimizer”, In repository of arXiv:1904.03711v1, Apr. 7, 2019, 18 Pages. [cited by applicant]
Poess, et al., “New TPC Benchmarks For Decision Support and Web Commerce”, In Journal of ACM Sigmod Record, vol. 29, Issue 4, Dec. 1, 2000, pp. 64-71. [cited by applicant]
Yin, et al., “Bubble Execution: Resource-Aware Reliable Analytics at Cloud Scale”, In Journal of the VLDB Endowment, vol. 11, Issue 7, Mar. 1, 2018, pp. 746-758. [cited by applicant]
Zhu, et al., “Looking Ahead Makes Query Plans Robust: Making the Initial Case with In-Memory Star Schema Data Warehouse Workloads”, In Journal of the VLDB Endowment, vol. 10, Issue 8, Apr. 1, 2017, pp. 889-900. [cited by applicant]
Zou, et al., “Regularization and Variable Selection via the Elastic Net”, In Journal of the Royal Statistical Society: Series B, vol. 67, Part 2, Apr. 1, 2005, pp. 301-320. [cited by applicant]
Office Action Received for European Application No. 20720888.5, mailed on Nov. 20, 2023, 8 Pages. [cited by applicant]
Notice of Grant Received for Chinese Application No. 202080029797.1, mailed on Sep. 20, 2024, 2 pages. [cited by applicant]
Decision to grant a European patent pursuant to Article 97(1) received in European Application No. 20720888.5, mailed on May 3, 2024, 2 pages. [cited by applicant]
First Office Action received for Chinese Application No. 202080029797.1, mailed on Feb. 26, 2024, 10 Pages (English Translation Provided). [cited by applicant]
First Examination Report received for IN Application No. 202117047535, mailed on Dec. 4, 2025, 8 pages. [cited by applicant]