Interface OptimizerFactory
-
- All Known Implementing Classes:
OptimizerFactoryImpl
public interface OptimizerFactoryThis is simply the factory for creating an optimizer.There is expected to be only one of these configured per database.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringMODULEModule name for the monitor's module locating system.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleandoJoinOrderOptimization()Tell whether to do join order optimization.CostEstimategetCostEstimate()Return a new CostEstimate.intgetMaxMemoryPerTable()Return the maxMemoryPerTable setting, this is used in optimizer, as well as subquery materialization at run time.OptimizergetOptimizer(OptimizableList optimizableList, OptimizablePredicateList predicateList, DataDictionary dDictionary, RequiredRowOrdering requiredRowOrdering, int numTablesInQuery, OptimizerPlan overridingPlan, LanguageConnectionContext lcc)Only one optimizer level should exist in the database, however, the connection may have multiple instances of that optimizer at a given time.booleansupportsOptimizerTrace()Return whether or not the optimizer associated with this factory supports optimizer trace.
-
-
-
Field Detail
-
MODULE
static final java.lang.String MODULE
Module name for the monitor's module locating system.- See Also:
- Constant Field Values
-
-
Method Detail
-
getOptimizer
Optimizer getOptimizer(OptimizableList optimizableList, OptimizablePredicateList predicateList, DataDictionary dDictionary, RequiredRowOrdering requiredRowOrdering, int numTablesInQuery, OptimizerPlan overridingPlan, LanguageConnectionContext lcc) throws StandardException
Only one optimizer level should exist in the database, however, the connection may have multiple instances of that optimizer at a given time.- Parameters:
optimizableList- The list of Optimizables to optimize.predicateList- The list of unassigned OptimizablePredicates.dDictionary- The DataDictionary to use.requiredRowOrdering- The required ordering of the rows to come out of the optimized result setnumTablesInQuery- The number of tables in the current queryoverridingPlan- (Optional) A complete plan specified by optimizer overrides. Must have been bound already.lcc- The LanguageConnectionContext RESOLVE - We probably want to pass a subquery list, once we define a new interface for them, so that the Optimizer can out where to attach the subqueries.- Throws:
StandardException- Thrown on error
-
getCostEstimate
CostEstimate getCostEstimate()
Return a new CostEstimate.
-
supportsOptimizerTrace
boolean supportsOptimizerTrace()
Return whether or not the optimizer associated with this factory supports optimizer trace.- Returns:
- Whether or not the optimizer associated with this factory supports optimizer trace.
-
getMaxMemoryPerTable
int getMaxMemoryPerTable()
Return the maxMemoryPerTable setting, this is used in optimizer, as well as subquery materialization at run time.- Returns:
- maxMemoryPerTable value
-
doJoinOrderOptimization
boolean doJoinOrderOptimization()
Tell whether to do join order optimization.- Returns:
truemeans do join order optimization,falsemeans don't do it.
-
-