CS4432: Database Systems II - PowerPoint PPT Presentation

About This Presentation
Title:

CS4432: Database Systems II

Description:

Then, compute IO costs for each operator. Then, sum up all costs. Done. cs4432. optimization ... Greedy bottom-up plan construction ... – PowerPoint PPT presentation

Number of Views:17
Avg rating:3.0/5.0
Slides: 8
Provided by: siro7
Learn more at: http://web.cs.wpi.edu
Category:

less

Transcript and Presenter's Notes

Title: CS4432: Database Systems II


1
CS4432 Database Systems II
  • Lecture 18
  • Query Optimizer Wrap Up

Professor Elke A. Rundensteiner
2
Operator Types
  • Stateful versus stateless operators
  • Select is stateless
  • Join is stateful
  • Blocking versus non-blocking operators
  • Select is non-blocking
  • Agg functions are blocking
  • Pipelined versus non-pipelined operators
  • Select is pipelinable
  • What about Join ? (see next slide)

3
Join?
  • Join Revelation is that it depends on the
    implementation strategy chosen for an operator
  • Iteration-join pipelinable
  • Merge-sort join blocking
  • Index join pipelinable
  • Hash join blocking

4
Costing of a complete plan
  • We went over an example query plan
  • Important first we classify operators as
    pipelined or not-pipelined
  • If pipelined, then for stateless operators the IO
    cost is zero (for example, for Select or Project)

5
Costing of a Complete Query Plan
  • What about a Select? How is it implemented?
  • If in middle of plan, pipeline it (one tuple at a
    time iteration)
  • If at leaf of plan, identify any potential index
    to use index-lookup to implement the Select
  • If index available, cost of implemention the
    select operator is equal to cost of an index
    lookup

6
Costing of a complete plan
  • Main idea
  • Determine of distinct values V(R,a)
  • Determine physical impl. Strategies per operator
  • Then, compute IO costs for each operator
  • Then, sum up all costs.
  • Done.

7
How to generate that good Physical Plan?
  • Many alternate search algorithms are possible
  • Exhaustive listing of all possible plans
  • Dynamic programming
  • Branch and bound
  • Greedy bottom-up plan construction
  • NOTE often only left-deep trees are being
    considered to keep the search space small.
Write a Comment
User Comments (0)
About PowerShow.com