Left outer join elimination on key
First Claim
1. A method of performing a query in a computer to retrieve data from a database, comprising:
- (a) determining whether any column from a right quantifier of a left outer join query is projected out of the query; and
(b) if not, then removing all predicates in an ON clause of the left outer join query, removing the right quantifier from the left outer join query, and converting the left outer join query to a simple select query.
1 Assignment
0 Petitions
Accused Products
Abstract
A query optimization technique that determines whether any column from a right quantifier of a left outer join query is projected out of the query. If not, then all predicates in an ON clause are removed from the left outer join query, the right quantifier is removed from the left outer join query, and the left outer join query is converted to a simple select query. A number of steps are performed to determine whether any of the columns quantified by the right quantifier participate in a projection list of the query. A set of equivalence class columns is computed for the query, wherein the equivalence classes are derived from equi-join predicates in the query. A set of columns quantified by the right quantifier across the computed set of equivalence classes is computed. A determination is made whether a subset of the set of columns form a key for the right quantifier. If the right quantifier columns are not projected out of the query, then the optimization may be performed.
7 Citations
6 Claims
-
1. A method of performing a query in a computer to retrieve data from a database, comprising:
-
(a) determining whether any column from a right quantifier of a left outer join query is projected out of the query; and
(b) if not, then removing all predicates in an ON clause of the left outer join query, removing the right quantifier from the left outer join query, and converting the left outer join query to a simple select query. - View Dependent Claims (2)
-
-
3. A computer-implemented apparatus for performing a query, comprising:
-
a computer, wherein the query is performed in the computer to retrieve data from a database;
logic, performed by the computer system, for;
(a) determining whether any column from a right quantifier of a left outer join query is projected out of the query; and
(b) if not, then removing all predicates in an ON clause of the left outer join query, removing the right quantifier from the left outer join query, and converting the left outer join query to a simple select query. - View Dependent Claims (4)
-
-
5. An article of manufacture embodying logic for performing a query in a computer to retrieve data from a database, the logic comprising:
-
(a) determining whether any column from a right quantifier of a left outer join query is projected out of the query; and
(b) if not, then removing all predicates in an ON clause of the left outer join query, removing the right quantifier from the left outer join query, and converting the left outer join query to a simple select query. - View Dependent Claims (6)
-
Specification