Top Description Fields Methods
org.apache.derby.iapi.sql.compile

public Interface OptimizerFactory

Known Direct Implementers
org.apache.derby.impl.sql.compile.OptimizerFactoryImpl
Imports
org.apache.derby.shared.common.error.StandardException, org.apache.derby.iapi.sql.conn.LanguageConnectionContext, org.apache.derby.iapi.sql.dictionary.DataDictionary

This is simply the factory for creating an optimizer.

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

Field Summary

Modifier and TypeField and Description
public static final String
MODULE

Module name for the monitor's module locating system.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true means do join order optimization, false means don't do it.
doJoinOrderOptimization
()

Tell whether to do join order optimization.

public CostEstimate
getCostEstimate()

Return a new CostEstimate.

public int

Returns:

maxMemoryPerTable value
getMaxMemoryPerTable
()

Return the maxMemoryPerTable setting, this is used in optimizer, as well as subquery materialization at run time.

public Optimizer
getOptimizer(OptimizableList
The list of Optimizables to optimize.
optimizableList
,
OptimizablePredicateList
The list of unassigned OptimizablePredicates.
predicateList
,
DataDictionary
The DataDictionary to use.
dDictionary
,
RequiredRowOrdering
The required ordering of the rows to come out of the optimized result set
requiredRowOrdering
,
int
The number of tables in the current query
numTablesInQuery
,
OptimizerPlan
(Optional) A complete plan specified by optimizer overrides. Must have been bound already.
overridingPlan
,
LanguageConnectionContext
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.
lcc
)

Only one optimizer level should exist in the database, however, the connection may have multiple instances of that optimizer at a given time.

public boolean

Returns:

Whether or not the optimizer associated with this factory supports optimizer trace.
supportsOptimizerTrace
()

Return whether or not the optimizer associated with this factory supports optimizer trace.

Field Detail

MODULEback to summary
public static final String MODULE

Module name for the monitor's module locating system.

Method Detail

doJoinOrderOptimizationback to summary
public boolean doJoinOrderOptimization()

Tell whether to do join order optimization.

Returns:boolean

true means do join order optimization, false means don't do it.

getCostEstimateback to summary
public CostEstimate getCostEstimate()

Return a new CostEstimate.

getMaxMemoryPerTableback to summary
public int getMaxMemoryPerTable()

Return the maxMemoryPerTable setting, this is used in optimizer, as well as subquery materialization at run time.

Returns:int

maxMemoryPerTable value

getOptimizerback to summary
public 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:OptimizableList

The list of Optimizables to optimize.

predicateList:OptimizablePredicateList

The list of unassigned OptimizablePredicates.

dDictionary:DataDictionary

The DataDictionary to use.

requiredRowOrdering:RequiredRowOrdering

The required ordering of the rows to come out of the optimized result set

numTablesInQuery:int

The number of tables in the current query

overridingPlan:OptimizerPlan

(Optional) A complete plan specified by optimizer overrides. Must have been bound already.

lcc:LanguageConnectionContext

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.

Exceptions
StandardException:
Thrown on error
supportsOptimizerTraceback to summary
public boolean supportsOptimizerTrace()

Return whether or not the optimizer associated with this factory supports optimizer trace.

Returns:boolean

Whether or not the optimizer associated with this factory supports optimizer trace.