Method and system for look ahead query evaluation planning based on interesting partition properties
First Claim
1. A method of processing a query in a relational database management system that operates in a computer network to retrieve data from computer storage, the method comprising:
- receiving a query for retrieving data stored in partitioned data tables, the query being associated with an operator and one or more subsequent operators for execution of the query;
generating a plurality of interesting partition requirements for the one or more subsequent operators of the query;
generating a set of possible partition requirements for the operator of the query;
for each possible partition requirement generated for the operator;
determining whether the possible partition requirement is the same as one of the interesting partition requirements generated previously for the one or more subsequent operators; and
creating an alternative evaluation plan having a partition property that satisfies the possible partition requirement if it is determined that the possible partition requirement is the same as one of the interesting partition requirements generated previously for the one or more subsequent operators.
1 Assignment
0 Petitions
Accused Products
Abstract
A relational data base management system includes a query processor that uses a query operator partition property to perform QEP pruning and to ensure that data input to a query operator is partitioned appropriately for the operation. The partition property indicates the group of network nodes across which a table is distributed. The query processor also makes use of partition classes that are designated “interesting classes” to perform preoptimization planning and query pruning, and to perform look-ahead partitioning based on partition classes that are identified as being of interest to future operations, thereby more efficiently evaluating complex query statements in an MPP, shared-nothing environment.
98 Citations
11 Claims
-
1. A method of processing a query in a relational database management system that operates in a computer network to retrieve data from computer storage, the method comprising:
-
receiving a query for retrieving data stored in partitioned data tables, the query being associated with an operator and one or more subsequent operators for execution of the query;
generating a plurality of interesting partition requirements for the one or more subsequent operators of the query;
generating a set of possible partition requirements for the operator of the query;
for each possible partition requirement generated for the operator;
determining whether the possible partition requirement is the same as one of the interesting partition requirements generated previously for the one or more subsequent operators; and
creating an alternative evaluation plan having a partition property that satisfies the possible partition requirement if it is determined that the possible partition requirement is the same as one of the interesting partition requirements generated previously for the one or more subsequent operators. - View Dependent Claims (2, 3, 4, 5, 6)
if no alternative evaluation plans for the query exist after performing the determining for each possible partition requirement;
selecting one of the possible partition requirements; and
creating an alternative evaluation plan that satisfies the selected partition requirement.
-
-
4. The method according to claim 1, further comprising:
-
if no alternative evaluation plans for the query exist after performing the determining for each possible partition requirement;
randomly selecting one of the possible partition requirements; and
creating an alternative evaluation plan that satisfies the randomly selected partition requirement.
-
-
5. The method according to claim 1, wherein generating the plurality of interesting partition requirements comprises generating the plurality of interesting partition requirements during a preoptimization phase.
-
6. The method according to claim 1, wherein the query comprises a Structured Query Language (SQL) query.
-
7. A relational database management system comprising:
-
a central processing unit of a computer network; and
a query processor that operates in the computer network to evaluate queries and retrieve data from computer storage, wherein the query processor is operative to perform query evaluation by receiving a query for retrieving data stored in partitioned data tables, where the query is associated with an operator and one or more subsequent operators for execution of the query;
generating a plurality of interesting partition requirements for at least the one or more subsequent operators of the query;
generating a set of possible partition requirements for the operator of the query;
for each possible partition requirement generated for the operator;
determining whether the possible partition requirement is the same as one of the interesting partition requirements generated previously for the one or more subsequent operators; and
creating an alternative evaluation plan having a partition property that satisfies the possible partition requirement if it is determined that the possible partition requirement is the same as one of the interesting partition requirements generated previously for the one or more subsequent operators.- View Dependent Claims (8, 9, 10, 11)
-
Specification