SlideShare ist ein Scribd-Unternehmen logo
1 von 69
Chapter 14: Query Optimization Database System Concepts 5 th  Ed. ©Silberschatz, Korth and Sudarshan See  www.db-book.com  for conditions on re-use
Chapter 14: Query Optimization ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.2 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Introduction ,[object Object],[object Object],[object Object],14.3 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Introduction (Cont.) ,[object Object],14.4 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Introduction (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.5 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Generating Equivalent Expressions Database System Concepts 5 th  Ed. ©Silberschatz, Korth and Sudarshan See  www.db-book.com  for conditions on re-use
Transformation of Relational Expressions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.7 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Equivalence Rules ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.8 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Equivalence Rules (Cont.) 5. Theta-join operations (and natural joins) are commutative. E 1   E 2  =  E 2     E 1 6. (a) Natural join operations are associative: ( E 1  E 2 )  E 3  = E 1  ( E 2  E 3 ) (b) Theta joins are associative in the following manner: ( E 1 1  E 2 )  2  3   E 3  = E 1 1  3  ( E 2   2  E 3 ) where  2   involves attributes from only  E 2  and  E 3 . 14.9 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Pictorial Depiction of Equivalence Rules 14.10 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Equivalence Rules (Cont.) 7. The selection operation distributes over the theta join operation under the following two conditions: (a) When all the attributes in  0  involve only the attributes of one  of the expressions ( E 1 ) being joined.  0 E 1   E 2 ) = ( 0 (E 1 ))    E 2   (b) When   1  involves only the attributes of  E 1  and    2  involves  only the attributes of  E 2 .   1    E 1     E 2 ) = ( 1 (E 1 ))    (   (E 2 )) 14.11 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Equivalence Rules (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.12 Database System Concepts - 5 th  Edition, Sep 1, 2006. )) ( ( )) ( ( ) ( 2 1 2 1 2 1 2 1 E E E E L L L L        ))) ( ( )) ( (( ) ( 2 1 2 1 4 2 3 1 2 1 2 1 E E E E L L L L L L L L           
Equivalence Rules (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.13 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Transformation Example: Pushing Selections ,[object Object],[object Object],[object Object],14.14 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Example with Multiple Transformations ,[object Object],[object Object],[object Object],[object Object],[object Object],14.15 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Multiple Transformations (Cont.) 14.16 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Transformation Example: Pushing Projections ,[object Object],[object Object],[object Object],[object Object],[object Object],14.17 Database System Concepts - 5 th  Edition, Sep 1, 2006.  customer_name ((  branch_city = “ Brooklyn”   ( branch) account) depositor )
Join Ordering Example ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.18 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Join Ordering Example (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.19 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Enumeration of Equivalent Expressions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.20 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Implementing Transformation Based Optimization ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.21 Database System Concepts - 5 th  Edition, Sep 1, 2006. E1 E2
Cost Estimation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.22 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Choice of Evaluation Plans ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.23 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Cost-Based Optimization ,[object Object],[object Object],[object Object],14.24 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Dynamic Programming in Optimization ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.25 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Join Order Optimization Algorithm procedure findbestplan( S ) if ( bestplan [ S ]. cost   ) return  bestplan [ S ] // else  bestplan [ S ] has not been computed earlier, compute it now if  ( S  contains only 1 relation) set  bestplan [ S ]. plan  and  bestplan [ S ]. cost  based on the best way  of accessing  S /* Using selections on S and indices on S */ else for each  non-empty subset  S 1 of  S  such that  S 1   S P1= findbestplan( S 1) P2= findbestplan( S  -  S 1) A = best algorithm for joining results of  P 1 and  P 2 cost =  P 1. cost  +  P 2. cost  + cost of  A if  cost  <  bestplan [ S ]. cost  bestplan [ S ]. cost  = cost bestplan [ S ]. plan  = “execute  P 1. plan ; execute  P 2. plan ; join results of  P 1 and  P 2 using  A ” return   bestplan [ S ] 14.26 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Left Deep Join Trees ,[object Object],14.27 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Cost of Optimization ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.28 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Interesting Sort Orders ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.29 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Heuristic Optimization ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.30 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Structure of Query Optimizers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.31 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Structure of Query Optimizers (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.32 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Statistics for Cost Estimation Database System Concepts 5 th  Ed. ©Silberschatz, Korth and Sudarshan See  www.db-book.com  for conditions on re-use
Statistical Information for Cost Estimation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.34 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Histograms ,[object Object],[object Object],[object Object],14.35 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Selection Size Estimation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.36 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Size Estimation of Complex Selections ,[object Object],[object Object],[object Object],[object Object],[object Object],14.37 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Join Operation: Running Example ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.38 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Estimation of the Size of Joins ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.39 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Estimation of the Size of Joins (Cont.) ,[object Object],[object Object],[object Object],14.40 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Estimation of the Size of Joins (Cont.) ,[object Object],[object Object],[object Object],[object Object],14.41 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Size Estimation for Other Operations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.42 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Size Estimation (Cont.) ,[object Object],[object Object],[object Object],[object Object],14.43 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Estimation of Number of Distinct Values ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.44 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Estimation of Distinct Values (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],14.45 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Estimation of Distinct Values (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.46 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Additional Optimization Techniques ,[object Object],[object Object],Database System Concepts 5 th  Ed. ©Silberschatz, Korth and Sudarshan See  www.db-book.com  for conditions on re-use
Optimizing Nested Subqueries** ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.48 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Optimizing Nested Subqueries (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.49 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Optimizing Nested Subqueries (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.50 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Optimizing Nested Subqueries (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.51 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Materialized Views** ,[object Object],[object Object],[object Object],[object Object],14.52 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Materialized View Maintenance ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.53 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Incremental View Maintenance ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.54 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Join Operation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.55 Database System Concepts - 5 th  Edition, Sep 1, 2006. A, 1 B, 2 1, p 2, r 2, s A, 1, p B, 2, r B, 2, s C,2 C, 2, r C, 2, s
Selection and Projection Operations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.56 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Aggregation Operations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.57 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Aggregate Operations (Cont.) ,[object Object],[object Object],[object Object],14.58 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Other Operations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.59 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Handling Expressions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.60 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Query Optimization and Materialized Views ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.61 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Materialized View Selection ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.62 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Extra Slides: Additional Optimization Techniques (see bibliographic notes) Database System Concepts 5 th  Ed. ©Silberschatz, Korth and Sudarshan See  www.db-book.com  for conditions on re-use
Top-K Queries  ,[object Object],[object Object],[object Object],[object Object],[object Object],14.64 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Optimization of Updates ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.65 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Parametric Query Optimization ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.66 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Join Minimization ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.67 Database System Concepts - 5 th  Edition, Sep 1, 2006.
Multiquery Optimization ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],14.68 Database System Concepts - 5 th  Edition, Sep 1, 2006.
End of Chapter Database System Concepts 5 th  Ed. ©Silberschatz, Korth and Sudarshan See  www.db-book.com  for conditions on re-use

Weitere ähnliche Inhalte

Was ist angesagt?

3. Relational Models in DBMS
3. Relational Models in DBMS3. Relational Models in DBMS
3. Relational Models in DBMSkoolkampus
 
Database : Relational Data Model
Database : Relational Data ModelDatabase : Relational Data Model
Database : Relational Data ModelSmriti Jain
 
The Database Environment Chapter 5
The Database Environment Chapter 5The Database Environment Chapter 5
The Database Environment Chapter 5Jeanie Arnoco
 
Functional dependencies and normalization for relational databases
Functional dependencies and normalization for relational databasesFunctional dependencies and normalization for relational databases
Functional dependencies and normalization for relational databasesJafar Nesargi
 
6. Integrity and Security in DBMS
6. Integrity and Security in DBMS6. Integrity and Security in DBMS
6. Integrity and Security in DBMSkoolkampus
 
Chapter 2 Relational Data Model-part 3
Chapter 2 Relational Data Model-part 3Chapter 2 Relational Data Model-part 3
Chapter 2 Relational Data Model-part 3Eddyzulham Mahluzydde
 
Chapter 2 Relational Data Model-part1
Chapter 2 Relational Data Model-part1Chapter 2 Relational Data Model-part1
Chapter 2 Relational Data Model-part1Eddyzulham Mahluzydde
 
Database Systems - Relational Data Model (Chapter 2)
Database Systems - Relational Data Model (Chapter 2)Database Systems - Relational Data Model (Chapter 2)
Database Systems - Relational Data Model (Chapter 2)Vidyasagar Mundroy
 
Chapter 7 relation database language
Chapter 7 relation database languageChapter 7 relation database language
Chapter 7 relation database languageJafar Nesargi
 
Relational database
Relational  databaseRelational  database
Relational databaseamkrisha
 
The Relational Data Model and Relational Database Constraints Ch5 (Navathe 4t...
The Relational Data Model and Relational Database Constraints Ch5 (Navathe 4t...The Relational Data Model and Relational Database Constraints Ch5 (Navathe 4t...
The Relational Data Model and Relational Database Constraints Ch5 (Navathe 4t...Raj vardhan
 
Relational Data Model Introduction
Relational Data Model IntroductionRelational Data Model Introduction
Relational Data Model IntroductionNishant Munjal
 
Database Design and Normalization Techniques
Database Design and Normalization TechniquesDatabase Design and Normalization Techniques
Database Design and Normalization TechniquesNishant Munjal
 
Database Systems - Normalization of Relations(Chapter 4/3)
Database Systems - Normalization of Relations(Chapter 4/3)Database Systems - Normalization of Relations(Chapter 4/3)
Database Systems - Normalization of Relations(Chapter 4/3)Vidyasagar Mundroy
 

Was ist angesagt? (20)

3. Relational Models in DBMS
3. Relational Models in DBMS3. Relational Models in DBMS
3. Relational Models in DBMS
 
Database : Relational Data Model
Database : Relational Data ModelDatabase : Relational Data Model
Database : Relational Data Model
 
Chapter3
Chapter3Chapter3
Chapter3
 
The Database Environment Chapter 5
The Database Environment Chapter 5The Database Environment Chapter 5
The Database Environment Chapter 5
 
Functional dependencies and normalization for relational databases
Functional dependencies and normalization for relational databasesFunctional dependencies and normalization for relational databases
Functional dependencies and normalization for relational databases
 
Denormalization
DenormalizationDenormalization
Denormalization
 
Dbms ER Model
Dbms ER ModelDbms ER Model
Dbms ER Model
 
6. Integrity and Security in DBMS
6. Integrity and Security in DBMS6. Integrity and Security in DBMS
6. Integrity and Security in DBMS
 
Chapter 2 Relational Data Model-part 3
Chapter 2 Relational Data Model-part 3Chapter 2 Relational Data Model-part 3
Chapter 2 Relational Data Model-part 3
 
Chapter 4
Chapter 4Chapter 4
Chapter 4
 
Dbms relational data model and sql queries
Dbms relational data model and sql queries Dbms relational data model and sql queries
Dbms relational data model and sql queries
 
Chapter 2 Relational Data Model-part1
Chapter 2 Relational Data Model-part1Chapter 2 Relational Data Model-part1
Chapter 2 Relational Data Model-part1
 
Database Systems - Relational Data Model (Chapter 2)
Database Systems - Relational Data Model (Chapter 2)Database Systems - Relational Data Model (Chapter 2)
Database Systems - Relational Data Model (Chapter 2)
 
Chapter 7 relation database language
Chapter 7 relation database languageChapter 7 relation database language
Chapter 7 relation database language
 
Relational database
Relational  databaseRelational  database
Relational database
 
The Relational Data Model and Relational Database Constraints Ch5 (Navathe 4t...
The Relational Data Model and Relational Database Constraints Ch5 (Navathe 4t...The Relational Data Model and Relational Database Constraints Ch5 (Navathe 4t...
The Relational Data Model and Relational Database Constraints Ch5 (Navathe 4t...
 
DBMS CS2
DBMS CS2DBMS CS2
DBMS CS2
 
Relational Data Model Introduction
Relational Data Model IntroductionRelational Data Model Introduction
Relational Data Model Introduction
 
Database Design and Normalization Techniques
Database Design and Normalization TechniquesDatabase Design and Normalization Techniques
Database Design and Normalization Techniques
 
Database Systems - Normalization of Relations(Chapter 4/3)
Database Systems - Normalization of Relations(Chapter 4/3)Database Systems - Normalization of Relations(Chapter 4/3)
Database Systems - Normalization of Relations(Chapter 4/3)
 

Andere mochten auch

5 normal forms in relational database theory
5 normal forms in relational database theory5 normal forms in relational database theory
5 normal forms in relational database theoryPankamol Srikaew
 
Database Normalization
Database NormalizationDatabase Normalization
Database NormalizationRathan Raj
 
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NFDatabase Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NFOum Saokosal
 
Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Jargalsaikhan Alyeksandr
 

Andere mochten auch (8)

normaliztion
normaliztionnormaliztion
normaliztion
 
5 normal forms in relational database theory
5 normal forms in relational database theory5 normal forms in relational database theory
5 normal forms in relational database theory
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
 
Normalization
NormalizationNormalization
Normalization
 
DBMS - Normalization
DBMS - NormalizationDBMS - Normalization
DBMS - Normalization
 
Databases: Normalisation
Databases: NormalisationDatabases: Normalisation
Databases: Normalisation
 
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NFDatabase Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
 
Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)
 

Ähnlich wie ch14

1b_query_optimization_sil_7ed_ch16.ppt
1b_query_optimization_sil_7ed_ch16.ppt1b_query_optimization_sil_7ed_ch16.ppt
1b_query_optimization_sil_7ed_ch16.pptArunachalamSelva
 
Query optimization
Query optimizationQuery optimization
Query optimizationNeha Behl
 
Transaction Management, Recovery and Query Processing.pptx
Transaction Management, Recovery and Query Processing.pptxTransaction Management, Recovery and Query Processing.pptx
Transaction Management, Recovery and Query Processing.pptxRoshni814224
 
Query Optimization - Brandon Latronica
Query Optimization - Brandon LatronicaQuery Optimization - Brandon Latronica
Query Optimization - Brandon Latronica"FENG "GEORGE"" YU
 
Building data fusion surrogate models for spacecraft aerodynamic problems wit...
Building data fusion surrogate models for spacecraft aerodynamic problems wit...Building data fusion surrogate models for spacecraft aerodynamic problems wit...
Building data fusion surrogate models for spacecraft aerodynamic problems wit...Shinwoo Jang
 
International Journal of Advanced Engineering and Management
 International Journal of Advanced Engineering and Management International Journal of Advanced Engineering and Management
International Journal of Advanced Engineering and ManagementIJOAEM
 
LATTICE-CELL : HYBRID APPROACH FOR TEXT CATEGORIZATION
LATTICE-CELL : HYBRID APPROACH FOR TEXT CATEGORIZATIONLATTICE-CELL : HYBRID APPROACH FOR TEXT CATEGORIZATION
LATTICE-CELL : HYBRID APPROACH FOR TEXT CATEGORIZATIONcscpconf
 
Control system Lab record
Control system Lab record Control system Lab record
Control system Lab record Yuvraj Singh
 
A hybrid bacterial foraging and modified particle swarm optimization for mode...
A hybrid bacterial foraging and modified particle swarm optimization for mode...A hybrid bacterial foraging and modified particle swarm optimization for mode...
A hybrid bacterial foraging and modified particle swarm optimization for mode...IJECEIAES
 

Ähnlich wie ch14 (20)

1b_query_optimization_sil_7ed_ch16.ppt
1b_query_optimization_sil_7ed_ch16.ppt1b_query_optimization_sil_7ed_ch16.ppt
1b_query_optimization_sil_7ed_ch16.ppt
 
ch14.ppt
ch14.pptch14.ppt
ch14.ppt
 
Query optimization
Query optimizationQuery optimization
Query optimization
 
ch13.ppt
ch13.pptch13.ppt
ch13.ppt
 
ch13.ppt
ch13.pptch13.ppt
ch13.ppt
 
Transaction Management, Recovery and Query Processing.pptx
Transaction Management, Recovery and Query Processing.pptxTransaction Management, Recovery and Query Processing.pptx
Transaction Management, Recovery and Query Processing.pptx
 
Ch14
Ch14Ch14
Ch14
 
Query Optimization - Brandon Latronica
Query Optimization - Brandon LatronicaQuery Optimization - Brandon Latronica
Query Optimization - Brandon Latronica
 
Building data fusion surrogate models for spacecraft aerodynamic problems wit...
Building data fusion surrogate models for spacecraft aerodynamic problems wit...Building data fusion surrogate models for spacecraft aerodynamic problems wit...
Building data fusion surrogate models for spacecraft aerodynamic problems wit...
 
Ch6
Ch6Ch6
Ch6
 
International Journal of Advanced Engineering and Management
 International Journal of Advanced Engineering and Management International Journal of Advanced Engineering and Management
International Journal of Advanced Engineering and Management
 
Lesson 32
Lesson 32Lesson 32
Lesson 32
 
AI Lesson 32
AI Lesson 32AI Lesson 32
AI Lesson 32
 
FractalTreeIndex
FractalTreeIndexFractalTreeIndex
FractalTreeIndex
 
LATTICE-CELL : HYBRID APPROACH FOR TEXT CATEGORIZATION
LATTICE-CELL : HYBRID APPROACH FOR TEXT CATEGORIZATIONLATTICE-CELL : HYBRID APPROACH FOR TEXT CATEGORIZATION
LATTICE-CELL : HYBRID APPROACH FOR TEXT CATEGORIZATION
 
Control system Lab record
Control system Lab record Control system Lab record
Control system Lab record
 
ch3
ch3ch3
ch3
 
Anudbms
AnudbmsAnudbms
Anudbms
 
Anudbms
AnudbmsAnudbms
Anudbms
 
A hybrid bacterial foraging and modified particle swarm optimization for mode...
A hybrid bacterial foraging and modified particle swarm optimization for mode...A hybrid bacterial foraging and modified particle swarm optimization for mode...
A hybrid bacterial foraging and modified particle swarm optimization for mode...
 

Mehr von KITE www.kitecolleges.com (20)

DISTRIBUTED INTERACTIVE VIRTUAL ENVIRONMENT
DISTRIBUTED INTERACTIVE VIRTUAL ENVIRONMENTDISTRIBUTED INTERACTIVE VIRTUAL ENVIRONMENT
DISTRIBUTED INTERACTIVE VIRTUAL ENVIRONMENT
 
BrainFingerprintingpresentation
BrainFingerprintingpresentationBrainFingerprintingpresentation
BrainFingerprintingpresentation
 
week-11x
week-11xweek-11x
week-11x
 
PPT (2)
PPT (2)PPT (2)
PPT (2)
 
week-10x
week-10xweek-10x
week-10x
 
week-1x
week-1xweek-1x
week-1x
 
week-18x
week-18xweek-18x
week-18x
 
ch16
ch16ch16
ch16
 
holographic versatile disc
holographic versatile discholographic versatile disc
holographic versatile disc
 
week-22x
week-22xweek-22x
week-22x
 
week-16x
week-16xweek-16x
week-16x
 
week-5x
week-5xweek-5x
week-5x
 
week-6x
week-6xweek-6x
week-6x
 
week-3x
week-3xweek-3x
week-3x
 
ch8
ch8ch8
ch8
 
Intro Expert Systems test-me.co.uk
Intro Expert Systems test-me.co.ukIntro Expert Systems test-me.co.uk
Intro Expert Systems test-me.co.uk
 
ch17
ch17ch17
ch17
 
ch4
ch4ch4
ch4
 
week-7x
week-7xweek-7x
week-7x
 
week-9x
week-9xweek-9x
week-9x
 

Kürzlich hochgeladen

HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxPoojaSen20
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinojohnmickonozaleda
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 

Kürzlich hochgeladen (20)

HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipino
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 

ch14

  • 1. Chapter 14: Query Optimization Database System Concepts 5 th Ed. ©Silberschatz, Korth and Sudarshan See www.db-book.com for conditions on re-use
  • 2.
  • 3.
  • 4.
  • 5.
  • 6. Generating Equivalent Expressions Database System Concepts 5 th Ed. ©Silberschatz, Korth and Sudarshan See www.db-book.com for conditions on re-use
  • 7.
  • 8.
  • 9. Equivalence Rules (Cont.) 5. Theta-join operations (and natural joins) are commutative. E 1  E 2 = E 2  E 1 6. (a) Natural join operations are associative: ( E 1 E 2 ) E 3 = E 1 ( E 2 E 3 ) (b) Theta joins are associative in the following manner: ( E 1 1 E 2 ) 2  3 E 3 = E 1 1  3 ( E 2 2 E 3 ) where  2 involves attributes from only E 2 and E 3 . 14.9 Database System Concepts - 5 th Edition, Sep 1, 2006.
  • 10. Pictorial Depiction of Equivalence Rules 14.10 Database System Concepts - 5 th Edition, Sep 1, 2006.
  • 11. Equivalence Rules (Cont.) 7. The selection operation distributes over the theta join operation under the following two conditions: (a) When all the attributes in  0 involve only the attributes of one of the expressions ( E 1 ) being joined.  0 E 1  E 2 ) = ( 0 (E 1 ))  E 2 (b) When  1 involves only the attributes of E 1 and  2 involves only the attributes of E 2 .   1   E 1  E 2 ) = ( 1 (E 1 ))  (  (E 2 )) 14.11 Database System Concepts - 5 th Edition, Sep 1, 2006.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16. Multiple Transformations (Cont.) 14.16 Database System Concepts - 5 th Edition, Sep 1, 2006.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26. Join Order Optimization Algorithm procedure findbestplan( S ) if ( bestplan [ S ]. cost  ) return bestplan [ S ] // else bestplan [ S ] has not been computed earlier, compute it now if ( S contains only 1 relation) set bestplan [ S ]. plan and bestplan [ S ]. cost based on the best way of accessing S /* Using selections on S and indices on S */ else for each non-empty subset S 1 of S such that S 1  S P1= findbestplan( S 1) P2= findbestplan( S - S 1) A = best algorithm for joining results of P 1 and P 2 cost = P 1. cost + P 2. cost + cost of A if cost < bestplan [ S ]. cost bestplan [ S ]. cost = cost bestplan [ S ]. plan = “execute P 1. plan ; execute P 2. plan ; join results of P 1 and P 2 using A ” return bestplan [ S ] 14.26 Database System Concepts - 5 th Edition, Sep 1, 2006.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33. Statistics for Cost Estimation Database System Concepts 5 th Ed. ©Silberschatz, Korth and Sudarshan See www.db-book.com for conditions on re-use
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53.
  • 54.
  • 55.
  • 56.
  • 57.
  • 58.
  • 59.
  • 60.
  • 61.
  • 62.
  • 63. Extra Slides: Additional Optimization Techniques (see bibliographic notes) Database System Concepts 5 th Ed. ©Silberschatz, Korth and Sudarshan See www.db-book.com for conditions on re-use
  • 64.
  • 65.
  • 66.
  • 67.
  • 68.
  • 69. End of Chapter Database System Concepts 5 th Ed. ©Silberschatz, Korth and Sudarshan See www.db-book.com for conditions on re-use