Validating multiple execution plans for database queries
First Claim
Patent Images
1. A method implemented at least in part by a computing device for constructing multiple alternative execution plans for a single database query, comprising:
- constructing one of the execution plans byselecting one of a plurality of operators from a root group of a data structure having a plurality of groups of alternative operators, certain of the operators having pointers to one or more different ones of the groups,selecting one of a plurality of the operators in at least one of the different groups,repeating the preceding act of selecting one of a plurality of the operators in at least one of the different groups until reaching an operator not having a pointer to another one of the groups,repeating the above acts, selecting at least one different operator for each of the constructed plans, where rank data is determined for each operator that distinguishes that operator from alternative operators in other groups, the rank data facilitating construction of the multiple alternative execution plans.
1 Assignment
0 Petitions
Accused Products
Abstract
Validation of large numbers of alternative execution plans for a database query, either an exhaustive enumeration of the complete space of alternatives, or else an unbiased random sample, is performed by efficiently constructing execution trees from a data structure having groups alternative operators that are ranked in a directory. Each global rank of a plan identifies that plan uniquely among all the alternative plans. The operators are unranked from the directory according to a specification that characterizes the desired plans.
33 Citations
20 Claims
-
1. A method implemented at least in part by a computing device for constructing multiple alternative execution plans for a single database query, comprising:
-
constructing one of the execution plans by selecting one of a plurality of operators from a root group of a data structure having a plurality of groups of alternative operators, certain of the operators having pointers to one or more different ones of the groups, selecting one of a plurality of the operators in at least one of the different groups, repeating the preceding act of selecting one of a plurality of the operators in at least one of the different groups until reaching an operator not having a pointer to another one of the groups, repeating the above acts, selecting at least one different operator for each of the constructed plans, where rank data is determined for each operator that distinguishes that operator from alternative operators in other groups, the rank data facilitating construction of the multiple alternative execution plans. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
-
-
14. A computer-readable medium having a tangible component and having computer-executable instructions for performing a method for constructing multiple alternative execution plans for a single database query, the method comprising the acts of:
-
constructing one of the execution plans by selecting one of a plurality of operators from a root group of a data structure having a plurality of groups of alternative operators, certain of the operators having pointers to one or more different ones of the groups, selecting one of a plurality of the operators in at least one of the different groups, repeating the preceding act of selecting one of a plurality of the operators in at least one of the different groups until reaching an operator not having a pointer to another one of the groups, repeating the above acts, selecting at least one different operator for each of the constructed plans;
where rank data is determined for each operator related to a combinationof operator choices in a plan tree occurring from the respective operator. - View Dependent Claims (15, 16, 17, 18, 19)
-
-
20. A computer readable medium having at least one physical media and encoded with a computer program code for constructing multiple alternative execution plans for a single database query, the medium having stored thereon data structure having a plurality of groups of alternative operators for carrying out the database query, at least some of the operators having pointers to one or more different ones of the groups, the data structure including:
-
a first data field including indicia representing locations of the operators within the data structure; a second data field including rank data for each operator related to alternative operators in other of the groups; and a third data field including a global rank based on the operator rank data for each query execution plan, the global rank uniquely identifying each execution plan relative to every other execution plan, the global rank data facilitating organization and validation of the multiple alternative execution plans.
-
Specification