1. A method for optimizing a database query, the database query including criteria that references a plurality of tables in order to re-order a result set generated for the database query; the method comprising the steps of: applying transitive closure analysis to the query; and based on the transitive closure analysis, rewriting the criteria to generate modified criteria to reduce the number of tables referenced thereby.