Physical planning of database queries using partial solutions
First Claim
1. A computer-implemented method of physical planning of database queries, comprising:
- receiving a database query including a plurality of portions;
receiving a request for generating an execution plan for the database query including the plurality of portions;
generating the execution plan for execution of the database query, comprising;
identifying the plurality of portions of the database query, wherein each portion of the database query is associated with one or more partial execution plans, each partial execution plan represents an execution plan for the portion of the database query and comprises one or more physical operators, and wherein each physical operator implements a database operation for producing an output data set from one or more input data sets;
determining a threshold number of partial execution plans for the database query based on a measure of complexity of the database query, the measure of complexity of the query representing an estimate of a number of feasible joins of the database query, the estimate determined based on at least one of;
(1) a structure of the database query or (2) a join enumeration performed using an ordered traversal of a graph representation of the database query, the threshold number limiting a number of candidate partial execution plans evaluated to determine a partial execution plan for each portion of the database query, the threshold number determined to be a value inversely proportionate to the measure of complexity of the database query;
determining a plurality of partial execution plans for execution of the database query by evaluating the number of candidate partial execution plans for each portion of the database query, each partial execution plan corresponding to a portion of the database query; and
combining the plurality of partial execution plans to generate the execution plan;
andexecuting the database query by executing the execution plan.
3 Assignments
0 Petitions
Accused Products
Abstract
A database system determines execution plans for database queries by evaluating a number of partial solutions for each database query. The database system determines a partial solutions limit on the number of partial solutions to be evaluated for determining the execution plan of the query. The database system determines a plurality of partial solutions, each partial solution corresponding to a portion of the execution plan for processing the database query. The database system evaluates a number of candidate partial solutions for determining a partial solution. The number of candidate partial solutions evaluated is determined based on the partial solutions limit. The database system combines the plurality of partial solutions to obtain an execution plan for the database query. The database system executes the database query by executing the execution plan.
40 Citations
25 Claims
-
1. A computer-implemented method of physical planning of database queries, comprising:
-
receiving a database query including a plurality of portions; receiving a request for generating an execution plan for the database query including the plurality of portions; generating the execution plan for execution of the database query, comprising; identifying the plurality of portions of the database query, wherein each portion of the database query is associated with one or more partial execution plans, each partial execution plan represents an execution plan for the portion of the database query and comprises one or more physical operators, and wherein each physical operator implements a database operation for producing an output data set from one or more input data sets; determining a threshold number of partial execution plans for the database query based on a measure of complexity of the database query, the measure of complexity of the query representing an estimate of a number of feasible joins of the database query, the estimate determined based on at least one of;
(1) a structure of the database query or (2) a join enumeration performed using an ordered traversal of a graph representation of the database query, the threshold number limiting a number of candidate partial execution plans evaluated to determine a partial execution plan for each portion of the database query, the threshold number determined to be a value inversely proportionate to the measure of complexity of the database query;determining a plurality of partial execution plans for execution of the database query by evaluating the number of candidate partial execution plans for each portion of the database query, each partial execution plan corresponding to a portion of the database query; and combining the plurality of partial execution plans to generate the execution plan; and executing the database query by executing the execution plan. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)
-
-
15. A non-transitory computer readable storage medium storing instructions thereon, the instructions comprising, instructions for:
-
receiving a database query including a plurality of portions; receiving a request for generating an execution plan for the database query including the plurality of portions; generating the execution plan for execution of the database query, comprising; identifying the plurality of portions of the database query, wherein each portion of the database query is associated with one or more partial execution plans, each partial execution plan represents an execution plan for the portion of the database query and comprises one or more physical operators, and wherein each physical operator implements a database operation for producing an output data set from one or more input data sets; determining a threshold number of partial execution plans for the database query based on a measure of complexity of the database query, the measure of complexity of the query representing an estimate of a number of feasible joins of the database query, the estimate determined based on at least one of;
(1) a structure of the database query or (2) a join enumeration performed using an ordered traversal of a graph representation of the database query, the threshold number limiting a number of candidate partial execution plans evaluated to determine a partial execution plan for each portion of the database query, the threshold number determined to be a value inversely proportionate to the measure of complexity of the database query;determining a plurality of partial execution plans for execution of the database query by evaluating the number of candidate partial execution plans for each portion of the database query, each partial execution plan corresponding to a portion of the database query; and combining the plurality of partial execution plans to generate the execution plan; and executing the database query by executing the execution plan. - View Dependent Claims (16, 17, 18, 19, 20, 21, 22, 23, 25)
-
-
24. A computer-implemented system for physical planning of database queries, the system comprising:
-
a computer processor; and a non-transitory computer-readable storage medium storing instructions thereon, the instructions comprising; receiving a database query including a plurality of portions; receiving a request for generating an execution plan for the database query including the plurality of portions; generating the execution plan for execution of the database query, comprising; identifying the plurality of portions of the database query, wherein each portion of the database query is associated with one or more partial execution plans, each partial execution plan represents an execution plan for the portion of the database query and comprises one or more physical operators, and wherein each physical operator implements a database operation for producing an output data set from one or more input data sets; determining a threshold number of partial execution plans for the database query based on a measure of complexity of the database query, the measure of complexity of the query representing an estimate of a number of feasible joins of the database query, the estimate determined based on at least one of;
(1) a structure of the database query or (2) a join enumeration performed using an ordered traversal of a graph representation of the database query, the threshold number limiting a number of candidate partial execution plans evaluated to determine a partial execution plan for each portion of the database query, the threshold number determined to be a value inversely proportionate to the measure of complexity of the database query;determining a plurality of partial execution plans for execution of the database query by evaluating the number of candidate partial execution plans for each portion of the database query, each partial execution plan corresponding to a portion of the database query; and combining the plurality of partial execution plans to generate the execution plan; and executing the database query by executing the execution plan.
-
Specification