Patent Document ID: 8554760
Application ID: 12574911

Base Claim:
1. A computer-implemented method of optimizing a query, comprising: receiving a first query configured to generate a result set, wherein the first query comprises an operation for an outer table, a first predicate, and a second predicate comprising a subquery correlating an inner table to the outer table, wherein the first predicate and the second predicate are disjunctive, wherein the subquery comprises an operation for the inner table and a correlation predicate correlating the inner table and the outer table, and wherein the second query comprises a left outer join operation between the inner table and the outer table using the correlation predicate; generating a first query tree representing the first query; generating a second query tree representing a second query configured to generate the result set, wherein the second query does not comprise the subquery, and wherein the second query comprises a group by operation configured to generate one row for each row in the outer table, and wherein the group by operation comprises a having clause comprising the first predicate and the second predicate; and generating a query plan based on the second query tree.

---

Claim 7:
7. The method recited in claim 1 , wherein the query plan comprises an operation with a processing cost at a factor of a number of rows in the outer table plus a number of rows in the inner table.