Interface OptimizerFactory

All Known Implementing Classes:
OptimizerFactoryImpl

public interface OptimizerFactory
This is simply the factory for creating an optimizer.

There is expected to be only one of these configured per database.

  • Field Details

  • Method Details

    • 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 set
      numTablesInQuery - The number of tables in the current query
      overridingPlan - (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:
      true means do join order optimization, false means don't do it.