1. In a database system, a method for constructing an optimal query execution plan for executing a query, the method comprising: receiving a query specifying at least one join condition between two or more database tables; identifying each query block within said query, each query block comprising an atomic portion of said query; creating subplans for each query block based on grouping portions of each query block; determining at least one favorable access plan for each subplan of each query block, said at least one favorable access plan determined based at least in part on estimated execution costs; generating an optimal access plan for each query block based upon said at least one favorable access plan determined for each subplan; and constructing an optimal query execution plan based upon said optimal access plan generated for each query block.