org.apache.derby.iapi.sql.compile
Interface AccessPath

All Known Implementing Classes:
AccessPathImpl

public interface AccessPath

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


Method Summary
 void copy(AccessPath copyFrom)
          Copy all information from the given AccessPath to this one.
 ConglomerateDescriptor getConglomerateDescriptor()
          Get whatever was last set as the conglomerate descriptor.
 CostEstimate getCostEstimate()
          Get the cost estimate for this AccessPath.
 boolean getCoveringIndexScan()
          Return whether or not the optimizer is considering a covering index scan on this AccessPath.
 JoinStrategy getJoinStrategy()
          Get the join strategy, as set by setJoinStrategy().
 int getLockMode()
          Get the lock mode, as last set in setLockMode().
 boolean getNonMatchingIndexScan()
          Return whether or not the optimizer is considering a non-matching index scan on this AccessPath.
 Optimizer getOptimizer()
          Get the optimizer associated with this access path.
 void initializeAccessPathName(DataDictionary dd, TableDescriptor td)
          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.
 void setConglomerateDescriptor(ConglomerateDescriptor cd)
          Set the conglomerate descriptor for this access path.
 void setCostEstimate(CostEstimate costEstimate)
          Set the given cost estimate in this AccessPath.
 void setCoveringIndexScan(boolean coveringIndexScan)
          Set whether or not to consider a covering index scan on the optimizable.
 void setJoinStrategy(JoinStrategy joinStrategy)
          Remember the given join strategy
 void setLockMode(int lockMode)
          Set the lock mode
 void setNonMatchingIndexScan(boolean nonMatchingIndexScan)
          Set whether or not to consider a non-matching index scan on this AccessPath.
 

Method Detail

setConglomerateDescriptor

public void setConglomerateDescriptor(ConglomerateDescriptor cd)
Set the conglomerate descriptor for this access path.

Parameters:
cd - A ConglomerateDescriptor
Returns:
Nothing.

getConglomerateDescriptor

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


setCostEstimate

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.


getCostEstimate

public CostEstimate getCostEstimate()
Get the cost estimate for this AccessPath. This is the last one set by setCostEstimate.


setCoveringIndexScan

public void setCoveringIndexScan(boolean coveringIndexScan)
Set whether or not to consider a covering index scan on the optimizable.

Returns:
Nothing.

getCoveringIndexScan

public boolean getCoveringIndexScan()
Return whether or not the optimizer is considering a covering index scan on this AccessPath.

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

setNonMatchingIndexScan

public void setNonMatchingIndexScan(boolean nonMatchingIndexScan)
Set whether or not to consider a non-matching index scan on this AccessPath.

Returns:
Nothing.

getNonMatchingIndexScan

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 Whether or not the optimizer is considering a non-matching index scan.

setJoinStrategy

public void setJoinStrategy(JoinStrategy joinStrategy)
Remember the given join strategy

Parameters:
joinStrategy - The best join strategy

getJoinStrategy

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


setLockMode

public void setLockMode(int lockMode)
Set the lock mode


getLockMode

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


copy

public void copy(AccessPath copyFrom)
Copy all information from the given AccessPath to this one.


getOptimizer

public Optimizer getOptimizer()
Get the optimizer associated with this access path.

Returns:
The optimizer associated with this access path.

initializeAccessPathName

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:
td - TableDescriptor of the base table.
dd - Datadictionary.
Throws:
StandardException - on error.

Built on Mon 2007-06-04 09:58:47+0400, from revision ???

Apache Derby V10.1 Engine Documentation - Copyright © 1997,2005 The Apache Software Foundation or its licensors, as applicable.