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.