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

public Interface AccessPath

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

AccessPath represents a proposed access path for an Optimizable. An Optimizable may have more than one proposed AccessPath.

Method Summary

Modifier and TypeMethod and Description
public void
copy(AccessPath copyFrom)

Copy all information from the given AccessPath to this one.

public ConglomerateDescriptor
getConglomerateDescriptor()

Get whatever was last set as the conglomerate descriptor.

public CostEstimate
getCostEstimate()

Get the cost estimate for this AccessPath.

public boolean

Returns:

boolean Whether or not the optimizer chose a covering index scan.
getCoveringIndexScan
()

Return whether or not the optimizer is considering a covering index scan on this AccessPath.

public JoinStrategy
getJoinStrategy()

Get the join strategy, as set by setJoinStrategy().

public int
getLockMode()

Get the lock mode, as last set in setLockMode().

public boolean

Returns:

boolean Whether or not the optimizer is considering a non-matching index scan.
getNonMatchingIndexScan
()

Return whether or not the optimizer is considering a non-matching index scan on this AccessPath.

public Optimizer

Returns:

The optimizer associated with this access path.
getOptimizer
()

Get the optimizer associated with this access path.

public void
initializeAccessPathName(DataDictionary
Datadictionary.
dd
,
TableDescriptor
TableDescriptor of the base table.
td
)

Sets the "name" of the access path.

public void
setConglomerateDescriptor(ConglomerateDescriptor
A ConglomerateDescriptor
cd
)

Set the conglomerate descriptor for this access path.

public void
setCostEstimate(CostEstimate costEstimate)

Set the given cost estimate in this AccessPath.

public void
setCoveringIndexScan(boolean coveringIndexScan)

Set whether or not to consider a covering index scan on the optimizable.

public void
setJoinStrategy(JoinStrategy
The best join strategy
joinStrategy
)

Remember the given join strategy

public void
setLockMode(int lockMode)

Set the lock mode

public void
setNonMatchingIndexScan(boolean nonMatchingIndexScan)

Set whether or not to consider a non-matching index scan on this AccessPath.

Method Detail

copyback to summary
public void copy(AccessPath copyFrom)

Copy all information from the given AccessPath to this one.

getConglomerateDescriptorback to summary
public ConglomerateDescriptor getConglomerateDescriptor()

Get whatever was last set as the conglomerate descriptor. Returns null if nothing was set since the last call to startOptimizing()

getCostEstimateback to summary
public CostEstimate getCostEstimate()

Get the cost estimate for this AccessPath. This is the last one set by setCostEstimate.

getCoveringIndexScanback to summary
public boolean getCoveringIndexScan()

Return whether or not the optimizer is considering a covering index scan on this AccessPath.

Returns:boolean

boolean Whether or not the optimizer chose a covering index scan.

getJoinStrategyback to summary
public JoinStrategy getJoinStrategy()

Get the join strategy, as set by setJoinStrategy().

getLockModeback to summary
public int getLockMode()

Get the lock mode, as last set in setLockMode().

getNonMatchingIndexScanback to summary
public boolean getNonMatchingIndexScan()

Return whether or not the optimizer is considering a non-matching index scan on this AccessPath. We expect to call this during generation, after access path selection is complete.

Returns:boolean

boolean Whether or not the optimizer is considering a non-matching index scan.

getOptimizerback to summary
public Optimizer getOptimizer()

Get the optimizer associated with this access path.

Returns:Optimizer

The optimizer associated with this access path.

initializeAccessPathNameback to summary
public void initializeAccessPathName(DataDictionary dd, TableDescriptor td) throws StandardException

Sets the "name" of the access path. if the access path represents an index then set the name to the name of the index. if it is an index created for a constraint, use the constraint name. This is called only for base tables.

Parameters
dd:DataDictionary

Datadictionary.

td:TableDescriptor

TableDescriptor of the base table.

Exceptions
StandardException:
on error.
setConglomerateDescriptorback to summary
public void setConglomerateDescriptor(ConglomerateDescriptor cd)

Set the conglomerate descriptor for this access path.

Parameters
cd:ConglomerateDescriptor

A ConglomerateDescriptor

setCostEstimateback to summary
public void setCostEstimate(CostEstimate costEstimate)

Set the given cost estimate in this AccessPath. Generally, this will be the CostEstimate for the plan currently under consideration.

setCoveringIndexScanback to summary
public void setCoveringIndexScan(boolean coveringIndexScan)

Set whether or not to consider a covering index scan on the optimizable.

setJoinStrategyback to summary
public void setJoinStrategy(JoinStrategy joinStrategy)

Remember the given join strategy

Parameters
joinStrategy:JoinStrategy

The best join strategy

setLockModeback to summary
public void setLockMode(int lockMode)

Set the lock mode

setNonMatchingIndexScanback to summary
public void setNonMatchingIndexScan(boolean nonMatchingIndexScan)

Set whether or not to consider a non-matching index scan on this AccessPath.