1. A computer-implemented method of optimizing a query, comprising: receiving a first query configured to generate a result set, wherein the 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; 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 generating a query plan based on the second query tree.