java.lang.Object
se.liu.ida.hefquin.engine.queryproc.impl.loptimizer.heuristics.GreedyBasedReordering
All Implemented Interfaces:
HeuristicForLogicalOptimization

public class GreedyBasedReordering extends Object implements HeuristicForLogicalOptimization
Implement a greedy algorithm to determine the join order of sub-plans. For a given logical plan, when a sub-plan with LogicalOpMultiwayJoin or LogicalOpJoin as the root operator is found, the order of sub-plans is determined by the unrestrictiveness score (so-called cost): starting with the sub-plan with the smallest cost and continuing with the next sub-plan with the smallest cost. Any of the defined formulas can be used for calculating the cost value to find the optimal order. One example of such formulas is JoinAwareWeightedUnboundVariableCount.