Class SimpleJoinOrderingQueryOptimizer
java.lang.Object
se.liu.ida.hefquin.engine.queryproc.impl.poptimizer.PhysicalOptimizerBase
se.liu.ida.hefquin.engine.queryproc.impl.poptimizer.simple.SimpleJoinOrderingQueryOptimizer
- All Implemented Interfaces:
PhysicalOptimizer
This class implements a simple query optimizer that focuses only
on join ordering, for which it uses an enumeration algorithm to
optimize any subplan that consists of a group of joins.
The concrete enumeration algorithm to be used for this purpose is
not hard-coded but, instead, can be specified by means of providing
an implementation of
JoinPlanOptimizer.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected PhysicalPlan[]getOptimizedSubPlans(PhysicalPlan plan, QueryProcContext ctxt) protected booleanbooleanReturn true if this optimizer expects that multiway joins are carried over from the given logical plan into the initial physical plan.optimize(PhysicalPlan initialPlan, QueryProcContext ctxt) optimizePlan(PhysicalPlan plan, QueryProcContext ctxt) Methods inherited from class se.liu.ida.hefquin.engine.queryproc.impl.poptimizer.PhysicalOptimizerBase
optimize
-
Field Details
-
joinPlanOptimizer
-
-
Constructor Details
-
SimpleJoinOrderingQueryOptimizer
-
-
Method Details
-
assumesLogicalMultiwayJoins
public boolean assumesLogicalMultiwayJoins() -
keepMultiwayJoinsInInitialPhysicalPlan
public boolean keepMultiwayJoinsInInitialPhysicalPlan()Description copied from class:PhysicalOptimizerBaseReturn true if this optimizer expects that multiway joins are carried over from the given logical plan into the initial physical plan. Thefunction passes this flag as the second argument of theinvalid reference
#optimize(LogicalPlan)function.invalid reference
LogicalToPhysicalPlanConverter#convert(LogicalPlan, boolean)- Specified by:
keepMultiwayJoinsInInitialPhysicalPlanin classPhysicalOptimizerBase
-
optimize
public Pair<PhysicalPlan,PhysicalOptimizationStats> optimize(PhysicalPlan initialPlan, QueryProcContext ctxt) throws PhysicalOptimizationException - Specified by:
optimizein classPhysicalOptimizerBase- Throws:
PhysicalOptimizationException
-
optimizePlan
public PhysicalPlan optimizePlan(PhysicalPlan plan, QueryProcContext ctxt) throws PhysicalOptimizationException - Throws:
PhysicalOptimizationException
-
getOptimizedSubPlans
protected PhysicalPlan[] getOptimizedSubPlans(PhysicalPlan plan, QueryProcContext ctxt) throws PhysicalOptimizationException - Throws:
PhysicalOptimizationException
-
hasMultiwayJoinAsRoot
-