1. A method of performing a query in a computer system to retrieve data from a database stored on the computer system, the method comprising: (a) generating a plurality of query execution plans (QEPs) for the query, wherein each of the QEPs includes an ordering of inner joins, outerjoins, and antijoins therein; (b) determining whether the ordering of inner joins, outerjoins, and antijoins for each QEP produces a semantically correct answer when executed, by extending a normal eligibility list (NEL) for each join predicate in the inner joins, outerjoins, and antijoins, wherein the NEL contains all tables referenced in the join predicate and an extended eligibility list (EEL) includes additional tables that are referenced in conflicting join predicates; (c) choosing one of the QEPs for execution to minimize an estimated cost associated therewith.