Inventors:
Awny K. Al-omari - Santa Clara CA
Harry A. Leslie - Los Altos Hills CA
Marek J. Fridrich - San Jose CA
Assignee:
Compaq Computer Corporation - Cupertino CA
International Classification:
G06F 1730
Abstract:
The present invention applies one or more pruning heuristics to the expression, the binding, and/or the substitute during a database query optimization process. The heuristics identify certain rules that can be eliminated by either not applying the rules and/or not implementing the rules for a given expression and context (if any) based upon one or more flow rates of the expression. The pruning heuristics can eliminate the application of rules based upon the flow rates of the binding or substitute, for example. Examples include (1) not applying (cutting) a MergeJoin rule for a join expression when an inner table is small enough to be stored in a memory space that is allocated for a HashJoin; (2) not applying implementation rules on the substitute of a left-shift rule for an expression if the resulting input data flow rate from the left child of the join is significantly larger in the substitute than in the binding; (3) not applying the join to TSJ (tuple substitute join) rule if the data flow output of the join expression is significantly larger than the data flow input from the inner child of the join expression; or (4) not applying implementation rules on the substitute join expression of a left shift rule if the number of cross products increases and if the data flow rate from the left child is increases.