Home

About

Advanced Search

Browse by Discipline

Scientific Societies

E-print Alerts

Add E-prints

E-print Network
FAQHELPSITE MAPCONTACT US


  Advanced Search  

 
Accurate Query Optimization by Sub-plan Memoization Ashraf Aboulnaga
 

Summary: Accurate Query Optimization by Sub-plan Memoization
Ashraf Aboulnaga
University of Wisconsin - Madison*
ashraf@cs.wisc.edu
Surajit Chaudhuri
Microsoft Research
surajitc@microsoft.com
December 1999
Technical Report
MSR-TR-99-102
Query optimizers use approximate techniques such as histograms or sampling for result size and distinct
value estimation, even though these techniques may incur high estimation errors, leading the optimizer to
choose sub-optimal query execution plans. In this report, we propose a novel approach to query
optimization that provides the query optimizer with exact values for the result size of operators and
operator trees, which we call sub-plans, and for the number of distinct values in the output of these sub-
plans. In our approach, the query optimizer optimizes the query and records all the sub-plans for which
result size or distinct value estimates are required in a data structure that we call the sub-plan memo.
After query optimization is completed, the sub-plans in the sub-plan memo are executed and their actual
result sizes and the number of distinct values in their outputs are recorded in the memo. The optimizer
then re-optimizes the query using the more accurate result size and distinct value information in the sub-

  

Source: Aboulnaga, Ashraf - School of Computer Science, University of Waterloo

 

Collections: Computer Technologies and Information Sciences