On Using Correlation-based Synopses during Query Optimization
Amol Deshpande and Joseph Hellerstein
EECS Department, University of California, Berkeley
Technical Report No. UCB/CSD-02-1173
, 2002
http://www2.eecs.berkeley.edu/Pubs/TechRpts/2002/CSD-02-1173.pdf
In recent years, a variety of complex synopsis structures have been proposed to capture statistical correlations present in database relations. The goal of that work has been to improve cardinality estimation during query optimization by improving statistics on "base tables". In order to use the correlation information for multi-table estimations as well, synopses must also be constructed on "intermediate result tables" during query optimization. We address that problem here, and show how to efficiently integrate multi-dimensional histograms and other complex synopsis structures into the search algorithm of a traditional query optimizer such as that of System R. <p>A main challenge in this work is minimizing the computational expense of dynamically computing synopses on intermediate tables during query optimization. We show that one only needs to construct a very small subset of all possible synopses to get the full estimation benefits of multi-dimensional modeling. We also show that choosing this subset unwisely can have unacceptable performance overheads. This leads to an "estimation planning" problem that has been ignored to date in literature: how to choose the most efficiently-computable collection of intermediate synopses to construct, so that all the required cardinality estimates can be computed as accurately as possible from the base-table synopses? <p>In this paper, we identify and formalize the estimation planning problem in the context of a System R-style optimizer extended with complex synopsis techniques such as multi-dimensional histograms. We propose algorithms that find very good estimation plans efficiently, and discuss properties of synopsis structures that make them amenable to efficient use in an optimizer.
BibTeX citation:
@techreport{Deshpande:CSD-02-1173, Author= {Deshpande, Amol and Hellerstein, Joseph}, Title= {On Using Correlation-based Synopses during Query Optimization}, Year= {2002}, Month= {Feb}, Url= {http://www2.eecs.berkeley.edu/Pubs/TechRpts/2002/5660.html}, Number= {UCB/CSD-02-1173}, Abstract= {In recent years, a variety of complex synopsis structures have been proposed to capture statistical correlations present in database relations. The goal of that work has been to improve cardinality estimation during query optimization by improving statistics on "base tables". In order to use the correlation information for multi-table estimations as well, synopses must also be constructed on "intermediate result tables" during query optimization. We address that problem here, and show how to efficiently integrate multi-dimensional histograms and other complex synopsis structures into the search algorithm of a traditional query optimizer such as that of System R. <p>A main challenge in this work is minimizing the computational expense of dynamically computing synopses on intermediate tables during query optimization. We show that one only needs to construct a very small subset of all possible synopses to get the full estimation benefits of multi-dimensional modeling. We also show that choosing this subset unwisely can have unacceptable performance overheads. This leads to an "estimation planning" problem that has been ignored to date in literature: how to choose the most efficiently-computable collection of intermediate synopses to construct, so that all the required cardinality estimates can be computed as accurately as possible from the base-table synopses? <p>In this paper, we identify and formalize the estimation planning problem in the context of a System R-style optimizer extended with complex synopsis techniques such as multi-dimensional histograms. We propose algorithms that find very good estimation plans efficiently, and discuss properties of synopsis structures that make them amenable to efficient use in an optimizer.}, }
EndNote citation:
%0 Report %A Deshpande, Amol %A Hellerstein, Joseph %T On Using Correlation-based Synopses during Query Optimization %I EECS Department, University of California, Berkeley %D 2002 %@ UCB/CSD-02-1173 %U http://www2.eecs.berkeley.edu/Pubs/TechRpts/2002/5660.html %F Deshpande:CSD-02-1173