METHOD,SYSTEM, AND PROGRAM FOR QUERY OPTIMIZATION WITH ALGEBRAIC RULES
First Claim
1. A method for executing a query, comprising:
- identifying a set of algebraic rules applicable to the query, wherein each of the algebraic rules represents a relationship between two columns in a relational database table;
identifying a source column by searching the query for a source predicate, wherein the source predicate is a range predicate;
identifying one or more candidate target columns by searching the set of algebraic rules, wherein each of the candidate target columns occurs on one side of a binding expression and the source column occurs on the other side of the binding expression; and
for each of the one or more candidate target columns, deriving a bounds subquery that provides a lower bound and an upper bound for a new range predicate; and
introducing the new range predicate into the query, wherein the query is executed to retrieve data from one or more data stores.
0 Assignments
0 Petitions
Accused Products
Abstract
Disclosed is technique for executing a query. A set of algebraic rules applicable to the query are identified, wherein each of the algebraic rules represents a relationship between two columns in a relational database table. A source column is identified by searching the query for a source predicate, wherein the source predicate is a range predicate. One or more candidate target columns are identified by searching the set of algebraic rules, wherein each of the candidate target columns occurs on one side of a binding expression and the source column occurs on the other side of the binding expression. For each of the one or more candidate target columns, a bounds subquery that provides a lower bound and an upper bound for a new range predicate is derived and the new range predicate is introduced into the query, wherein the query is executed to retrieve data from one or more data stores.
39 Citations
21 Claims
-
1. A method for executing a query, comprising:
-
identifying a set of algebraic rules applicable to the query, wherein each of the algebraic rules represents a relationship between two columns in a relational database table;
identifying a source column by searching the query for a source predicate, wherein the source predicate is a range predicate;
identifying one or more candidate target columns by searching the set of algebraic rules, wherein each of the candidate target columns occurs on one side of a binding expression and the source column occurs on the other side of the binding expression; and
for each of the one or more candidate target columns, deriving a bounds subquery that provides a lower bound and an upper bound for a new range predicate; and
introducing the new range predicate into the query, wherein the query is executed to retrieve data from one or more data stores. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. An article of manufacture comprising one of hardware logic and a computer readable medium including a program for executing a query, wherein the hardware logic or program causes operations to be performed, the operations comprising:
-
identifying a set of algebraic rules applicable to the query, wherein each of the algebraic rules represents a relationship between two columns in a relational database table;
identifying a source column by searching the query for a source predicate, wherein the source predicate is a range predicate;
identifying one or more candidate target columns by searching the set of algebraic rules, wherein each of the candidate target columns occurs on one side of a binding expression and the source column occurs on the other side of the binding expression; and
for each of the one or more candidate target columns, deriving a bounds subquery that provides a lower bound and an upper bound for a new range predicate; and
introducing the new range predicate into the query, wherein the query is executed to retrieve data from one or more data stores. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19, 20)
-
-
21. A system for executing a query, comprising:
-
means for identifying a set of algebraic rules applicable to the query, wherein each of the algebraic rules represents a relationship between two columns in a relational database table;
means for identifying a source column by searching the query for a source predicate, wherein the source predicate is a range predicate;
means for identifying one or more candidate target columns by searching the set of algebraic rules, wherein each of the candidate target columns occurs on one side of a binding expression and the source column occurs on the other side of the binding expression; and
for each of the one or more candidate target columns, means for deriving a bounds subquery that provides a lower bound and an upper bound for a new range predicate; and
means for introducing the new range predicate into the query, wherein the query is executed to retrieve data from one or more data stores.
-
Specification