REMOVING NODES FROM A QUERY TREE BASED ON A RESULT SET
First Claim
1. A method comprising:
- creating a query tree that represents a first query expression, wherein the query tree comprises a union of a plurality of nodes, wherein each of the nodes represents a respective partition of a table, and wherein the first query expression specifies a key value;
determining whether a result set exists that comprises the key value, wherein the result set was previously retrieved from the table; and
if the determining is true, deciding based on the result set whether the key value is stored in the respective partition represented by each of the plurality of nodes.
1 Assignment
0 Petitions
Accused Products
Abstract
In an embodiment, a query tree is created that represents a query expression, where the query tree includes a union of nodes. Each of the nodes represents a respective partition of a table, and the query expression specifies a key value and the table. A determination is made whether a result set exists that includes the key value, where the result set was previously retrieved from the table. If the determination is true, a decision is made based on the result set whether the key value is stored in the respective partition represented by each of the nodes. The nodes for which the key value is not stored in the respective partition are removed from the query tree to create an optimization tree, and the optimization tree is used to retrieve data from the table. In this way, nodes that are not necessary to be searched may be removed from query trees, in order to increase the performance of the query.
58 Citations
20 Claims
-
1. A method comprising:
-
creating a query tree that represents a first query expression, wherein the query tree comprises a union of a plurality of nodes, wherein each of the nodes represents a respective partition of a table, and wherein the first query expression specifies a key value;
determining whether a result set exists that comprises the key value, wherein the result set was previously retrieved from the table; and
if the determining is true, deciding based on the result set whether the key value is stored in the respective partition represented by each of the plurality of nodes. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A signal-bearing medium encoded with instructions, wherein the instructions when executed comprise:
-
creating a query tree that represents a first query expression, wherein the query tree comprises a union of a plurality of nodes, wherein each of the nodes represents a respective partition of a table, and wherein the first query expression specifies a key value and the table;
determining whether a result set exists that comprises the key value, wherein the result set was previously retrieved from the table;
if the determining is true, deciding based on the result set whether the key value is stored in the respective partition represented by each of the plurality of nodes;
removing the nodes for which the key value is not stored in the respective partition from the query tree to create an optimization tree; and
retrieving data from the table via the optimization tree. - View Dependent Claims (10, 11, 12, 13, 14, 15)
-
-
16. A method for configuring a computer, comprising:
-
configuring the computer to create a query tree that represents a first query expression, wherein the query tree comprises a union of a plurality of nodes, wherein each of the nodes represents a respective partition of a table, and wherein the first query expression specifies a key value and the table;
configuring the computer to determine whether a result set exists that comprises the key value, wherein the result set was previously retrieved from the table;
configuring the computer to, if the determining is true, decide based on the result set whether the key value is stored in the respective partition represented by each of the plurality of nodes;
configuring the computer to remove the nodes for which the key value is not stored in the respective partition from the query tree to create an optimization tree; and
configuring the computer to retrieve data from the table via the optimization tree. - View Dependent Claims (17, 18, 19, 20)
-
Specification