Chapter 21
Chapter 21 - Objectives
Slide 3
Slide 4
Introduction
Slide 6
Query Processing
Query Optimization
Example 21.1 - Different Strategies
Slide 10
Slide 11
Example 21.1 - Cost Comparison
Phases of Query Processing
Slide 14
Dynamic versus Static Optimization
Slide 16
Query Decomposition
Analysis
Analysis - Example
Slide 20
Example 21.1 - R.A.T.
Normalization
Semantic Analysis
Slide 24
Semantic Analysis - Normalized Attribute Connection Graph
Example 21.2 - Checking Semantic Correctness
Slide 27
Slide 28
Simplification
Transformation Rules for RA Operations
Slide 31
Slide 32
Slide 33
Slide 34
Slide 35
Slide 36
Slide 37
Slide 38
Slide 39
Slide 40
Slide 41
Slide 42
Slide 43
Slide 44
Slide 45
Example 21.3 Use of Transformation Rules
Slide 47
Slide 48
Slide 49
Heuristical Processing Strategies
Slide 51
Cost Estimation for RA Operations
Database Statistics
Typical Statistics for Relation R
Typical Statistics for Attribute A of Relation R
Statistics for Multilevel Index I on Attribute A
Selection Operation
Slide 58
Estimating Cardinality of Selection
Linear Search (Ordered File, No Index)
Binary Search (Ordered File, No Index)
Equality of Hash Key
Equality Condition on Primary Key
Inequality Condition on Primary Key
Equality Condition on Clustering Index
Equality Condition on Non-Clustering Index
Inequality Condition on a Secondary B+-Tree Index
Composite Predicates - Conjunction without Disjunction
Composite Predicates - Selections with Disjunction
Join Operation
Estimating Cardinality of Join
Slide 72
Block Nested Loop Join
Slide 74
Indexed Nested Loop Join
Sort-Merge Join
Slide 77
Hash Join
Projection Operation
Estimating Cardinality of Projection
Duplicate Elimination using Sorting
Duplicate Elimination using Hashing
Set Operations
Estimating Cardinality of Set Operations
Aggregate Operations
Slide 86
Enumeration of Alternative Strategies
Pipelining
Types of Trees
Slide 90
Physical Operators & Strategies
Slide 92
Reducing the Search Space
Dynamic Programming
Slide 95
Slide 96
Slide 97
Slide 98
Slide 99
Slide 100
Semantic Query Optimization
Slide 102
Query Optimization in Oracle
QO in Oracle – Rule-Based
QO in Oracle – Rule-based: Example
QO in Oracle – Cost-Based
QO in Oracle – Statistics
QO in Oracle – Histograms
Slide 109
Slide 110
Slide 111
QO in Oracle – Viewing Execution Plan