23. A system for optimizing a sub query during optimization of a database query, the system comprising: a computer having a processor and memory; a query rewrite module for receiving a database query including at least one subquery and building a query optimization graph comprising a plurality of plan nodes for each query block of the database query, the query optimization graph including at least one subquery plan node representing said at least one subquery; a plan generation module for generating access methods and join methods for plan nodes of each query block, including generating pre-computed subquery access methods and subquery join methods for said at least one subquery plan node prior to optimization of each query block based on subquery type and semantic properties of the database query; a cost estimation module for estimating of execution costs of the access methods and join methods, including generating an estimate of execution costs of pre-computed subquery access methods and join methods for use during optimization of each query block; an optimizer module for optimizing each query block to determine an optimal access plan for the query block based upon selecting pre-computed subquery access methods and join methods for subquery plan nodes of the query block as well as access methods, join methods, and join order for other plan nodes of said query optimization graph having favorable execution costs, wherein each query block is optimized without transformation of the subqueries using the pre-computed access methods and join methods; an access plan creation module for constructing a detailed access plan for execution of the database query based upon the optimal access plan determined for each query block; and an execution module for executing the detailed access plan and returning results of the database query.
23. A system for optimizing a sub query during optimization of a database query, the system comprising: a computer having a processor and memory; a query rewrite module for receiving a database query including at least one subquery and building a query optimization graph comprising a plurality of plan nodes for each query block of the database query, the query optimization graph including at least one subquery plan node representing said at least one subquery; a plan generation module for generating access methods and join methods for plan nodes of each query block, including generating pre-computed subquery access methods and subquery join methods for said at least one subquery plan node prior to optimization of each query block based on subquery type and semantic properties of the database query; a cost estimation module for estimating of execution costs of the access methods and join methods, including generating an estimate of execution costs of pre-computed subquery access methods and join methods for use during optimization of each query block; an optimizer module for optimizing each query block to determine an optimal access plan for the query block based upon selecting pre-computed subquery access methods and join methods for subquery plan nodes of the query block as well as access methods, join methods, and join order for other plan nodes of said query optimization graph having favorable execution costs, wherein each query block is optimized without transformation of the subqueries using the pre-computed access methods and join methods; an access plan creation module for constructing a detailed access plan for execution of the database query based upon the optimal access plan determined for each query block; and an execution module for executing the detailed access plan and returning results of the database query. 29. The system of claim 23 , wherein said subquery access methods include a subquery access method using an aggregate and then join subquery execution strategy for a subquery.