Preventing bad plans by bounding the impact of cardinality estimation errors

Guido Moerkotte, Thomas Neumann, Gabriele Steidl

Research output: Contribution to journalArticlepeer-review

127 Scopus citations

Abstract

Query optimizers rely on accurate estimations of the sizes of intermediate results. Wrong size estimations can lead to overly expensive execution plans. We first define the q-error to measure deviations of size estimates from actual sizes. The q-error enables the derivation of two important results: (1) We provide bounds such that if the q-error is smaller than this bound, the query optimizer constructs an optimal plan. (2) If the q-error is bounded by a number q, we show that the cost of the produced plan is at most a factor of q4 worse than the optimal plan. Motivated by these findings, we next show how to find the best approximation under the q-error. These techniques can then be used to build synopsis for size estimates. Finally, we give some experimental results where we apply the developed techniques.

Original languageEnglish
Pages (from-to)982-993
Number of pages12
JournalProceedings of the VLDB Endowment
Volume2
Issue number1
DOIs
StatePublished - 2009
Externally publishedYes

Fingerprint

Dive into the research topics of 'Preventing bad plans by bounding the impact of cardinality estimation errors'. Together they form a unique fingerprint.

Cite this