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
FieldsFields inherited from class se.liu.ida.hefquin.engine.queryproc.impl.poptimizer.PhysicalOptimizerBase
l2pConverter
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleJoinOrderingQueryOptimizer
(JoinPlanOptimizer joinPlanOptimizer, LogicalToPhysicalPlanConverter l2pConverter) -
Method Summary
Modifier and TypeMethodDescriptionboolean
protected PhysicalPlan[]
protected boolean
boolean
Return true if this optimizer expects that multiway joins are carried over from the given logical plan into the initial physical plan.optimize
(PhysicalPlan initialPlan) optimizePlan
(PhysicalPlan plan) Methods inherited from class se.liu.ida.hefquin.engine.queryproc.impl.poptimizer.PhysicalOptimizerBase
optimize
-
Field Details
-
joinPlanOptimizer
-
-
Constructor Details
-
SimpleJoinOrderingQueryOptimizer
public SimpleJoinOrderingQueryOptimizer(JoinPlanOptimizer joinPlanOptimizer, LogicalToPhysicalPlanConverter l2pConverter)
-
-
Method Details
-
assumesLogicalMultiwayJoins
public boolean assumesLogicalMultiwayJoins() -
keepMultiwayJoinsInInitialPhysicalPlan
public boolean keepMultiwayJoinsInInitialPhysicalPlan()Description copied from class:PhysicalOptimizerBase
Return true if this optimizer expects that multiway joins are carried over from the given logical plan into the initial physical plan. ThePhysicalOptimizerBase.optimize(LogicalPlan)
function passes this flag as the second argument of theLogicalToPhysicalPlanConverter.convert(LogicalPlan, boolean)
function.- Specified by:
keepMultiwayJoinsInInitialPhysicalPlan
in classPhysicalOptimizerBase
-
optimize
public Pair<PhysicalPlan,PhysicalOptimizationStats> optimize(PhysicalPlan initialPlan) throws PhysicalOptimizationException - Specified by:
optimize
in classPhysicalOptimizerBase
- Throws:
PhysicalOptimizationException
-
optimizePlan
- Throws:
PhysicalOptimizationException
-
getOptimizedSubPlans
protected PhysicalPlan[] getOptimizedSubPlans(PhysicalPlan plan) throws PhysicalOptimizationException - Throws:
PhysicalOptimizationException
-
hasMultiwayJoinAsRoot
-