Ch13 QueryOptimization Korth6E
Ch13 QueryOptimization Korth6E
● Find out how to view query execution plans on your favorite database
Database System Concepts - 6th 1.4 ©Silberschatz, Korth and Sudarshan
Introduction (Cont.)
(E1 E)
θ1 2 θ2∧ θ3
E3 = E 1 θ1∧ θ3
(E2 θ2
E3)
σθ0(E1 θ
E2) = (σθ0(E1)) θ
E2
∏ L1 ∪ L2 ( E1 θ E2 ) = ∏ L1 ∪ L2 ( ∏ L1 ∪ L3 ( E1 ) θ (∏ L2 ∪ L4 ( E2 ))
( ) )
(r1 r2) r3
so that we compute and store a smaller temporary relation.
E E
1 2
● Same sub-expression may get generated multiple times
4 Detect duplicate sub-expressions and share one copy
● Time requirements are reduced by not generating all expressions
● Dynamic programming
4 We will study only the special case of dynamic programming for join
order optimization