US 7,490,110 B2
Predictable query execution through early materialization
Stephan Eberhard Ewen, Stuttgart (Germany); Holger Kache, San Jose, Calif. (US); Guy Maring Lohman, San Jose, Calif. (US); Volker Gerhard Markl, San Jose, Calif. (US); and Vijayshankar Raman, San Jose, Calif. (US)
Assigned to International Business Machines Corporation, Armonk, N.Y. (US)
Filed on Mar. 24, 2006, as Appl. No. 11/388,934.
Prior Publication US 2007/0226178 A1, Sep. 27, 2007
Int. Cl. G06F 17/30 (2006.01)
U.S. Cl. 707—200  [707/204; 707/205] 30 Claims
OG exemplary drawing
 
1. A computer program product for query execution through materialization of intermediate results, the computer program product comprising:
a computer usable medium having computer usable program code tangibly embodied thereon, the computer usable program code comprising:
computer usable program code for identifying a set of sub-plans of a query execution plan prior to execution of the query execution plan, wherein each sub-plan of the set of sub-plans comprises a portion of the query execution plan for which an intermediate result of the sub-plan does not depend on other parts of the query execution plan that have not already been executed;
computer usable program code for computing the set of sub-plans prior to execution of the query execution plan and prior to the computation of the other parts of the query execution plan, wherein computing the set of sub-plans comprises:
computer usable program code for computing a set of intermediate results for the set of sub-plans to form a set of computed intermediate results;
computer usable program code for materializing the set of the computed intermediate results to form a set of materialized computed intermediate results;
computer usable program code for storing the set of materialized computed intermediate results;
computer usable program code for obtaining statistics from the set of the computed materialized intermediate results; and
computer usable program code for determining, based on the statistics, which materialized computed intermediate results of the set of materialized computed intermediate results are useable to optimize the query execution plan for cost, to form useable materialized computed intermediate results; and
computer usable program code for optimizing the query execution plan for cost using the useable materialized computed intermediate results to form an optimized query execution plan.