6.4    Rules



           A model's rules define the logical and physical search space -- the space of query trees and plans from which the lowest cost plan will be chosen.

           The first source for transformation rules was standard database textbooks [Elmasri 94] [Ullman 87]. These texts contain standard relational algebra transformations.

           Assuming that it is almost always beneficial to push down selects, the parser pushes the SELECT operator down as far as possible in the initial query. That is, in the initial query tree, the SELECT logical operator lies directly over the GET logical operator, if possible. As a result, SELECT push-down rules are not required in Model D. (This demonstrates how the transformation rules that are required are dependent on the structure of the initial query tree.)

           Some of the standard transformation rules which could be applied were not implemented. Most of the Pull up SELECT rules such as AGG_LIST through SELECT (equivalent to Pull Up Select through an AGG_LIST) are not part of Model D. We did not anticipate a large reduction in cost based on these rules. As a result, the model has only a few rules to move the SELECT logical operator (except for PROJECT_THRU_SELECT, discussed below).

           Model D does have rules to push down the PROJECT logical operator. Here are the rules to push project through four of the other logical operators:
PROJECT_THRU_SELECT
PROJECT_THRU_FUNC_OP
PROJECT_THRU_EQJOIN
PROJECT_THRU_AGG_LIST

           These rules allow a project that starts out above the AGG_LIST logical operator in the initial logical expression to be pushed down to lie just over the GET logical operator.

6.4 Rules:    <Join Order> <Aggregates> <Facilitators> <Enforcement>

 Page 1