More Cost Based Plan Selection, Joins




CS157b

Chris Pollett

Mar 19, 2018

Outline

Cost-Based Plan Selection

Obtaining Estimates for Size Parameters

Incremental Computation of Statistics

Heuristics for Reducing the Cost of Logical Query Plans

Approaches to Enumerating Physical Plans

Quiz

Which of the following statements is true?

  1. Our cost estimate for index-based join was the same for sparse/clustered versus non clustered/dense indexes.
  2. For `S= sigma_{A=c}(R)`, we gave in class a query cost estimate of `T(S)=(T(R))/(V(R,A))`.
  3. In class we estimated $T(R \bowtie S)$ as `(T(R) cdot T(S))/(V(R,Y)+V(S,Y))`.

More on Enumerating Physical Plans

Join Order - Significance of Left and Right Join Arguments

Join Trees

Left-Deep Join Trees

Some Advantages of Left Deep Join Trees