IP Library Granted Patent US 11,971,793
Granted Patent B2
US 11,971,793 · App. 16/292,990 · Granted Apr 30, 2024

Machine learning model-based dynamic prediction of estimated query execution time taking into account other, concurrently executing queries

Inventors: Yuanzhe Bei (Cambridge, MA); Zhihao Zheng (Cambridge, MA)
Assignee: Micro Focus LLC
G06F11/3006G06F16/24542G06F16/9027
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,971,793
App. No.
16/292,990
Granted
Apr 30, 2024
Kind
B2
Abstract

Current physical resources utilization of a computing system as a whole is monitored. The number of queries concurrently being executed against a database by a database management system (DBMS) running on a computing system is monitored. A query plan for a received query to be executed against the database is generated. The query plan includes operators; the generation of the query plan includes generation of query-based statistics for the received query on a per-operator basis without consideration of the queries concurrently being executed. An estimated execution time of the received query is dynamically predicted using a machine-learning model based on the query-based statistics generated for the received query on the per-operator basis, the current physical resources utilization of the computing system, and the number of queries concurrently being executed. The received query is executed against the database based on the dynamically predicted estimated execution time for the received query.

Claims (60)

1. A non-transitory computer-readable data storage medium storing program code executable by a computing system on which a database management system (DBMS) is running to:

monitor how many queries are concurrently being executed against a database by the DBMS, to maintain a count of the queries concurrently being executed;

monitor current physical resources utilization of the computing system as a whole and not on a per-query basis, such that the current physical resources utilization reflects all activity of the computing system, including the queries concurrently being executed as well as other activity of the computing system;

generate a query plan for a received query to be executed against the database of the DBMS, the query plan comprising a hierarchical tree of a plurality of operators that are executable in a bottom-up manner to execute the received query, wherein during generation of the query plan query-based statistics for the received query are generated for each operator of the plurality of operators of the hierarchical tree of the query plan with respect to the received query in isolation and without consideration of the queries concurrently being executed;

provide an input vector to a machine-learning model, the input vector including each of only three types of input features:

the current physical resources utilization of the computing system as a whole and not on a per-query basis, as a first type of input feature;

the count of the queries concurrently being executed, as a second type of input feature; and

the query-based statistics for each operator of the query plan and generated during generation of the query plan, as a third type of input feature;

receive as output from the machine-learning model an estimated execution time of the received query, the machine-learning model using each of the three types of input features included in the input vector provided to the machine-learning model to dynamically predict the estimated execution time; and

execute the received query against the database, by executing the operators of the query plan, based on the estimated execution time for the received query.

2. The non-transitory computer-readable data storage medium of claim 1 , wherein generation of the query plan for the received query comprises generation of the plurality of operators arranged in the hierarchical tree.

3. The non-transitory computer-readable data storage medium of claim 1 , wherein generation of the query plan for the received query further comprises, for each operator, generation of processor utilization, memory utilization, and network utilization to execute the operator,

and wherein the query-based statistics for the received query comprises the processor utilization, the memory utilization, and the network utilization of each operator.

4. The non-transitory computer-readable data storage medium of claim 3 , wherein generation of the query plan for the received query further comprises, for each operator, a number of input table rows to be input to execute the operator, and an estimated number of output table rows that the operator will output upon execution of the operator,

and wherein the query-based statistics for the received query comprises the number of input table rows and the number of output table rows of each operator.

5. The non-transitory computer-readable data storage medium of claim 3 , wherein generation of the query plan for the received query further comprises generation of a total resource usage to execute the query,

and wherein the query-based statistics for the received query comprises the total resource usage of the query.

6. The non-transitory computer-readable data storage medium of claim 1 , wherein generation of the query plan for the received query comprises generation of a plurality of candidate query plans, generation of a total resource usage of each candidate query plan without taking into account the queries concurrently being executed against the database, and selection of the candidate query plan having a lowest total resource usage.

7. The non-transitory computer-readable data storage medium of claim 1 , wherein the machine-learning model comprises a random forest regression tree model.

8. The non-transitory computer-readable data storage medium of claim 1 , wherein the current physical resources utilization comprises one or multiple of:

a current processor utilization of the computing system as a whole and not on a per-query basis;

a current memory utilization of the computing system as a whole and not on a per-query basis;

a current storage utilization of the computing system as a whole and not on a per-query basis;

a current network utilization of the computing system as a whole and not on a per-query basis.

9. The non-transitory computer-readable data storage medium of claim 1 , wherein execution of the received query comprises execution of the query plan.

10. The non-transitory computer-readable data storage medium of claim 9 , wherein the query plan comprises the plurality of operators arranged in an operation tree,

and wherein execution of the query plan comprises execution of the operators as arranged in the operation tree, over a plurality of pipelines of the DBMS.

11. The non-transitory computer-readable data storage medium of claim 1 , wherein execution of the received query based on the dynamic predicted estimated execution time comprises assignment of the received query to a selected resource pool of a plurality of resource pools based on the dynamic predicted estimated execution time,

and wherein the received query is executed using computing resources of the selected resource pool to which the received query has been assigned.

12. A computing system comprising:

physical resources, including a storage device storing a database of a database management system (DBMS), a processor, and memory;

query monitoring logic implemented by the physical resources to dynamically monitor how many queries are concurrently being executed by the DBMS against the database, to maintain a count of the queries concurrently being executed;

resource monitoring logic implemented by the physical resources to dynamically monitor current physical resources utilization of the physical resources of the computing system as a whole and not on a per-query basis such that the current physical resources utilization reflects all activity of the computing system, including the queries concurrently being executed as well as other activity of the computing system; and

DBMS logic implemented using the physical resources to:

receive a plurality of query-based statistics for each operator of a plurality of operators of a query plan fora received query to be executed against the database, the query plan comprising a hierarchical tree of the plurality of operators that are executable in a bottom-up manner to execute the received query, wherein during generation of the query plan the query-based statistics for the received query are generated for each operator of the plurality of operators of the hierarchical tree of the query plan with respect to the received query in isolation and without taking into account the queries concurrently being executed;

provide an input vector to a machine-learning model, the input vector including each of only three types of input features;

the current physical resources utilization of the computing system as a whole and not on a per-query basis, as a first type of input feature;

the count of the queries concurrently being executed, as a second type of input feature; and

the query-based statistics for each operator of the query plan and generated during generation of the query plan, as a third type of input feature;

receive as output from the machine-learning model an estimated execution time of the received query, the machine-learning model using each of the three types of input features included in the input vector provided to the machine-learning model to dynamically predict the estimated execution time; and

cause the DBMS to execute the received query against the database, by executing the operators of the query plane based on the estimated execution time for the received query.

13. The computing system of claim 12 , wherein the query-based statistics are generated as part of generation of the query plan for the received query.

14. The computing system of claim 12 , wherein the query-based statistics are generated as part of selection of the query plan for the received query from a plurality of candidate query plans for the received query plan, the query plan selected as the candidate query plan having a lowest total resource usage determined without accounting for the concurrent queries being executed.

15. The computing system of claim 12 , wherein the query-based statistics for each operator comprise utilization of the physical resources to execute the operator for each of a plurality of different physical resource types.

16. The computing system of claim 15 , wherein the query-based statistics for each operator further comprise:

a total resource usage to execute the operator, the total resource usage determined without accounting for the concurrent queries being executed; and

input and output table rows pertaining to the operator.

17. The computing system of claim 12 , wherein the query plan is executed based on the predicted estimated execution time for the received query by executing the query plan using a resource pool of the physical resources selected based on the predicted estimated execution time.

18. The computing system of claim 12 , wherein the machine-learning model comprises a random forest regression tree model.

19. A method comprising:

monitoring how many queries are concurrently being executed against a database by a database management system (DBMS) running on a computing system, to maintain a count of the queries concurrently being executed;

monitoring current physical resources utilization of the computing system as a whole and not on a per-query basis, such that the current physical resources utilization reflects all activity of the computing system, including the queries concurrently being executed as well as other activity of the computing system;

generating a query plan for a received query to be executed against the database of the DBMS, the query plan comprising a hierarchical tree of a plurality of operators that are executable in a bottom-up manner to execute the received query, wherein during generation of the query plan query-based statistics for the received query are generated for each operator of the plurality of operators of the hierarchical tree of the query plan with respect to the received query in isolation and without consideration of the queries concurrently being executed against the database;

providing an input vector to a machine-learning model, the input vector including each of only three types of input features:

the current physical resources utilization of the computing system as a whole and not on a per-query basis, as a first type of input feature;

the count of the queries concurrently being executed, as a second type of input feature; and

the query-based statistics for each operator of the query plan and generated during generation of the query plan, as a third type of input feature;

receiving as output from the machine-learning model an estimated execution time of the received query, the machine-learning model using each of the three types of input features included in the input vector provided to the machine-learning model to dynamically predict the estimated execution time; and

executing the received query against the database, by executing the operators of the query plan, based on the estimated execution time for the received query.

20. The method of claim 19 , wherein the machine-learning model comprises a random forest regression tree model.

Assignments (6)
RELEASE OF SECURITY INTEREST REEL/FRAME 052294/0522 Recorded Feb 2, 2023
From: JPMORGAN CHASE BANK, N.A.
To: MICRO FOCUS LLC; MICRO FOCUS SOFTWARE INC. (F/K/A NOVELL, INC.); NETIQ CORPORATION
Reel/Frame 062624/0449 →
RELEASE OF SECURITY INTEREST REEL/FRAME 052295/0041 Recorded Feb 2, 2023
From: JPMORGAN CHASE BANK, N.A.
To: MICRO FOCUS LLC; MICRO FOCUS SOFTWARE INC. (F/K/A NOVELL, INC.); NETIQ CORPORATION
Reel/Frame 062625/0754 →
SECURITY AGREEMENT Recorded Apr 2, 2020
From: MICRO FOCUS LLC; BORLAND SOFTWARE CORPORATION; MICRO FOCUS SOFTWARE INC.; NETIQ CORPORATION; MICRO FOCUS (US), INC.
To: JPMORGAN CHASE BANK, N.A.
Reel/Frame 052294/0522 →
SECURITY AGREEMENT Recorded Apr 2, 2020
From: MICRO FOCUS LLC; BORLAND SOFTWARE CORPORATION; MICRO FOCUS SOFTWARE INC.; NETIQ CORPORATION; MICRO FOCUS (US), INC.
To: JPMORGAN CHASE BANK, N.A.
Reel/Frame 052295/0041 →
CHANGE OF NAME Recorded Aug 8, 2019
From: ENTIT SOFTWARE LLC
To: MICRO FOCUS LLC
Reel/Frame 050004/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 5, 2019
From: BEI, YUANZHE; ZHENG, ZHIHAO
To: ENTIT SOFTWARE LLC
Reel/Frame 048507/0125 →