



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A set of lecture notes for cs 4420 database system implementation course at georgia tech, focusing on query optimization, specifically cost-based query optimization and intermediate result estimation. The notes include an introduction, midterm questions and answers, lecture outline, and detailed explanations on estimating intermediate results and i/o costs.
Typology: Study notes
1 / 5
This page cannot be seen from the preview
Don't miss anything!




1 Prepared by Ling Liu
Ling Liu Associate Professor College of Computing, Georgia Tech
2
DB10 (^) Introduction
z Chapter 1 z Chapter 2 – Section 2.1 to Section 2. z Chapter 3 – Section 3.1, Section 3.2, Section 3.4, Section 3. z Chapter 4 z Chapter 5 – Section 5.1 to Section 5.3. z Chapter 6 – Section 6.1 to Section 6.4, Section 6.6, Section
z Chapter 7 – Section 7.1 to Section 7.5.3, Section 7.7 to Section 7.7.
3 Prepared by Ling Liu
Lecture Outline
4
DB10 (^) Introduction
Relational Query Optimization
z Goal: Reduce the search space of logical query plans z Mechanisms: Æ Algebraic Transformation or Query rewritting Æ Heuristics for good transformations ) Push Selection and Projection closer to the base relations in a SQL query tree. ) Reduce intermediate result size as much as possible
7 Prepared by Ling Liu
Estimate Intermediate Results
z T(R) : # tuples in R z S(R) : # of bytes in each R tuple z V(R, A) : # distinct values in R for attribute A z B(R) = # of blocks containing R tuples
Selection: W = σCOND(R)
8
DB10 (^) Introduction
Estimate Intermediate Results
Projection: W = πA(R)
9 Prepared by Ling Liu
Estimating I/O costs
zT(R) : # tuples in R zS(R) : # of bytes in each R tuple zV(R, A) : # distinct values in R for attribute A z B(R) = # of blocks containing R tuples z f(R) = max # of tuples of R per block z M = # memory blocks available z HT(i) = # levels in index I z B(i) = # of leaf blocks in index i
10
DB10 (^) Introduction
Selection, Projection, Join
z Relations Contiguous or not z Index or not z Hash or not