1. A computer program product comprising a computer usable medium including computer usable program code for query execution through materialization of intermediate results, the computer program product comprising: computer usable program code for computing a set of intermediate results for a set of sub-plans of a query execution plan; computer usable program code for materializing a set of the computed intermediate results; computer usable program code for obtaining statistics from a set of the materialized intermediate results; and computer usable program code for optimizing the query execution plan based on the statistics.