Dynamic optimization for processing a restartable sub-tree of a query execution plan
First Claim
1. A computer-implemented method for managing execution of a restartable sub-tree of a query execution plan, the method comprising the steps of:
- generating a query execution plan for a query that includes a sub-query, wherein the execution plan includes a restartable sub-tree associated with the sub-query;
performing at query execution runtime one or more determinations from a set of determinations that consists of;
determining the amount of time to restart the sub-tree using two or more parallel processes, wherein restarting the sub-tree comprises initiating the two or more parallel processes to execute the sub-tree and allocating the two or more processes to perform various parts of the sub-tree, anddetermining the amount of time to probe the sub-tree using the two or more parallel processes, wherein probing the sub-tree comprises determining whether a row meets one or more conditions specified in the sub-query to which the sub-tree is associated; and
determining at query execution runtime whether using two or more parallel processes is a preferred mode of executing the sub-tree based, at least in part, on the outcome of the one or more determinations.
1 Assignment
0 Petitions
Accused Products
Abstract
Execution of a restartable sub-tree of a query execution plan comprises determining whether use of parallel processes is a preferred or optimal mode of executing the sub-tree. The determination is based, at least in part, on how long it takes to restart the sub-tree using two or more parallel processes and/or how long it takes to probe the sub-tree, i.e., to fetch a row that meets one or more conditions or correlations associated with the sub-query, using the two or more parallel processes. Thus, a dynamic computational cost-based operation is described, which determines at query runtime whether to execute the restartable sub-tree using a single server process or multiple parallel server processes.
137 Citations
18 Claims
-
1. A computer-implemented method for managing execution of a restartable sub-tree of a query execution plan, the method comprising the steps of:
-
generating a query execution plan for a query that includes a sub-query, wherein the execution plan includes a restartable sub-tree associated with the sub-query; performing at query execution runtime one or more determinations from a set of determinations that consists of; determining the amount of time to restart the sub-tree using two or more parallel processes, wherein restarting the sub-tree comprises initiating the two or more parallel processes to execute the sub-tree and allocating the two or more processes to perform various parts of the sub-tree, and determining the amount of time to probe the sub-tree using the two or more parallel processes, wherein probing the sub-tree comprises determining whether a row meets one or more conditions specified in the sub-query to which the sub-tree is associated; and determining at query execution runtime whether using two or more parallel processes is a preferred mode of executing the sub-tree based, at least in part, on the outcome of the one or more determinations. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A computer-readable medium carrying one or more sequences of instructions for managing execution of a correlation sub-query, wherein execution of the one or more sequences of instructions by one or more processors causes the one or more processors to perform the steps of:
-
generating a query execution plan for a query, wherein said query includes a sub-query, and wherein the query execution plan includes a restartable sub-tree associated with the sub-query; performing at query execution runtime one or more determinations from a set of determinations that consists of determining the amount of time to restart the sub-tree using two or more parallel processes, wherein restarting the sub-tree comprises initiating the two or more parallel processes to execute the sub-tree and allocating the two or more processes to perform various parts of the sub-tree, and determining the amount of time to probe the sub-tree using the two or more parallel processes, wherein probing the sub-tree comprises determining whether a row meets one or more conditions specified in the sub-query to which the sub-tree is associated; and determining at query execution runtime whether using two or more parallel processes is a preferred mode of executing the sub-tree based, at least in part, on the outcome of the one or more determinations. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16)
-
-
17. An apparatus for managing execution of a correlation sub-query, comprising:
-
means for generating a query execution plan for a query, wherein said query includes a sub-query, and wherein the query execution plan includes a restartable sub-tree associated with the sub-query; means for performing at query execution runtime one or more determinations from a set of determinations that consists of determining the amount of time to restart the sub-tree using two or more parallel processes, wherein restarting the sub-tree comprises initiating the two or more parallel processes to execute the sub-tree and allocating the two or more processes to perform various parts of the sub-tree, and determining the amount of time to probe the sub-tree using the two or more parallel processes, wherein probing the sub-tree comprises determining whether a row meets one or more conditions specified in the sub-query to which the sub-tree is associated; and means for determining at query execution runtime whether using two or more parallel processes is a preferred mode of executing the sub-tree based, at least in part, on the outcome of the one or more determinations.
-
-
18. A computer apparatus, comprising:
-
a memory; and one or more processors coupled to the memory and configured to execute one or more sequence of instructions for managing execution of a correlation sub-query, wherein execution of the one or more sequences of instructions by one or more processors causes the one or more processors to perform the steps of; generating a query execution plan for a query, wherein said query includes a sub-query, and wherein the query execution plan includes a restartable sub-tree associated with the sub-query; performing at query execution runtime one or more determinations from a set of determinations that consists of determining the amount of time to restart the sub-tree using two or more parallel processes, wherein restarting the sub-tree comprises initiating the two or more parallel processes to execute the sub-tree and allocating the two or more processes to perform various parts of the sub-tree, and determining the amount of time to probe the sub-tree using the two or more parallel processes, wherein probing the sub-tree comprises determining whether a row meets one or more conditions specified in the sub-query to which the sub-tree is associated; and determining at query execution runtime whether using two or more parallel processes is a preferred mode of executing the sub-tree based, at least in part, on the outcome of the one or more determinations.
-
Specification