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

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

Parameters:
cd - A ConglomerateDescriptor

getConglomerateDescriptor

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


setCostEstimate

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

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


setCoveringIndexScan

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


getCoveringIndexScan

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

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


getNonMatchingIndexScan

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

void setJoinStrategy(JoinStrategy joinStrategy)
Remember the given join strategy

Parameters:
joinStrategy - The best join strategy

getJoinStrategy

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


setLockMode

void setLockMode(int lockMode)
Set the lock mode


getLockMode

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


copy

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


getOptimizer

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

Returns:
The optimizer associated with this access path.

initializeAccessPathName

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 Thu 2011-03-10 11:54:14+0000, from revision ???

Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.