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

public Interface OptimizableList

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

OptimizableList provides services for optimizing a list of Optimizables (tables) in a query.

Method Summary

Modifier and TypeMethod and Description
public Optimizable

Returns:

Optimizable The nth Optimizables in the list.
getOptimizable
(int
"index" (0 based) into the list.
n
)

Return the nth Optimizable in the list.

public void
initAccessPaths(Optimizer
The optimizer being used.
optimizer
)

Init the access paths for these optimizables.

public boolean
legalJoinOrder(int numTablesInQuery)

Tell whether the join order is legal.

public boolean
optimizeJoinOrder()

Tell whether the join order should be optimized.

public void
reOrder(int[] joinOrder)

Set the join order for this list of optimizables.

public void
setOptimizable(int
"index" (0 based) into the list.
n
,
Optimizable
New nth Optimizable.
optimizable
)

Set the nth Optimizable to the specified Optimizable.

public int

Returns:

integer The number of Optimizables in the list.
size
()

Return the number of Optimizables in the list.

public boolean
useStatistics()

user can specify that s/he doesn't want statistics to be considered when optimizing the query.

public void
verifyProperties(DataDictionary
The DataDictionary to use.
dDictionary
)

Verify that the Properties list with optimizer overrides, if specified, is valid

Method Detail

getOptimizableback to summary
public Optimizable getOptimizable(int n)

Return the nth Optimizable in the list.

Parameters
n:int

"index" (0 based) into the list.

Returns:Optimizable

Optimizable The nth Optimizables in the list.

initAccessPathsback to summary
public void initAccessPaths(Optimizer optimizer)

Init the access paths for these optimizables.

Parameters
optimizer:Optimizer

The optimizer being used.

legalJoinOrderback to summary
public boolean legalJoinOrder(int numTablesInQuery)

Tell whether the join order is legal.

optimizeJoinOrderback to summary
public boolean optimizeJoinOrder()

Tell whether the join order should be optimized.

reOrderback to summary
public void reOrder(int[] joinOrder)

Set the join order for this list of optimizables. The join order is represented as an array of integers - each entry in the array stands for the order of the corresponding element in the list. For example, a joinOrder of {2, 0, 1} means that the 3rd Optimizable in the list (element 2, since we are zero-based) is the first one in the join order, followed by the 1st element in the list, and finally by the 2nd element in the list. This method shuffles this OptimizableList to match the join order. Obviously, the size of the array must equal the number of elements in the array, and the values in the array must be between 0 and the number of elements in the array minus 1, and the values in the array must be unique.

setOptimizableback to summary
public void setOptimizable(int n, Optimizable optimizable)

Set the nth Optimizable to the specified Optimizable.

Parameters
n:int

"index" (0 based) into the list.

optimizable:Optimizable

New nth Optimizable.

sizeback to summary
public int size()

Return the number of Optimizables in the list.

Returns:int

integer The number of Optimizables in the list.

useStatisticsback to summary
public boolean useStatistics()

user can specify that s/he doesn't want statistics to be considered when optimizing the query.

verifyPropertiesback to summary
public void verifyProperties(DataDictionary dDictionary) throws StandardException

Verify that the Properties list with optimizer overrides, if specified, is valid

Parameters
dDictionary:DataDictionary

The DataDictionary to use.

Exceptions
StandardException:
Thrown on error