A method, apparatus, and article of manufacture for optimizing a query in
a computer system, wherein the query is performed by the computer system
to retrieve data from a database stored on the computer system. The
optimization is performed by identifying a correlated subquery in the
query that qualifies for transformation, transitively closing a local
filtering predicate within the identified correlated subquery that is on
a same column as a correlation join predicate within the identified
correlated subquery, and pulling out or bubbling up the transitively
closed predicate from the correlated subquery to a parent query block of
the query.