Page 222 - DCAP402_DCAO204_DATABASE MANAGEMENT SYSTEM_MANAGING DATABASE
P. 222
Unit 12: Query Processing and Optimization
Notes
Figure 12.8
Finally projection may be moved inside. Thus the resulting query tree may be:
Figure 12.9
Obtaining Alternative Query Expressions
Query optimisers use equivalence rules to systematically generate expressions equivalent to
the given expression. Conceptually, they generate all equivalent expressions by repeatedly
executing the equivalence rules until no more expressions are to be found. For each expression
found, use all applicable equivalence rules and add newly generated expressions to the set of
expressions already found. However, the approach above is very expensive both in time space
requirements. The heuristics rules given above may be used to reduce cost and to create a few
possible but good equivalent query expression.
LOVELY PROFESSIONAL UNIVERSITY 215