Class AccessPathImpl
java.lang.Object
org.apache.derby.impl.sql.compile.AccessPathImpl
- All Implemented Interfaces:
AccessPath
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
(package private) ConglomerateDescriptor
private CostEstimate
(package private) boolean
(package private) JoinStrategy
(package private) int
(package private) boolean
(package private) Optimizer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
copy
(AccessPath copyFrom) Copy all information from the given AccessPath to this one.Get whatever was last set as the conglomerate descriptor.Get the cost estimate for this AccessPath.boolean
Return whether or not the optimizer is considering a covering index scan on this AccessPath.Get the join strategy, as set by setJoinStrategy().int
Get the lock mode, as last set in setLockMode().boolean
Return whether or not the optimizer is considering a non-matching index scan on this AccessPath.Get the optimizer associated with this access path.void
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
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 strategyvoid
setLockMode
(int lockMode) Set the lock modevoid
setNonMatchingIndexScan
(boolean nonMatchingIndexScan) Set whether or not to consider a non-matching index scan on this AccessPath.toString()
-
Field Details
-
cd
-
costEstimate
-
coveringIndexScan
boolean coveringIndexScan -
nonMatchingIndexScan
boolean nonMatchingIndexScan -
joinStrategy
JoinStrategy joinStrategy -
lockMode
int lockMode -
optimizer
Optimizer optimizer -
accessPathName
-
-
Constructor Details
-
AccessPathImpl
AccessPathImpl(Optimizer optimizer)
-
-
Method Details
-
setConglomerateDescriptor
Description copied from interface:AccessPath
Set the conglomerate descriptor for this access path.- Specified by:
setConglomerateDescriptor
in interfaceAccessPath
- Parameters:
cd
- A ConglomerateDescriptor- See Also:
-
getConglomerateDescriptor
Description copied from interface:AccessPath
Get whatever was last set as the conglomerate descriptor. Returns null if nothing was set since the last call to startOptimizing()- Specified by:
getConglomerateDescriptor
in interfaceAccessPath
- See Also:
-
setCostEstimate
Description copied from interface:AccessPath
Set the given cost estimate in this AccessPath. Generally, this will be the CostEstimate for the plan currently under consideration.- Specified by:
setCostEstimate
in interfaceAccessPath
- See Also:
-
getCostEstimate
Description copied from interface:AccessPath
Get the cost estimate for this AccessPath. This is the last one set by setCostEstimate.- Specified by:
getCostEstimate
in interfaceAccessPath
- See Also:
-
setCoveringIndexScan
public void setCoveringIndexScan(boolean coveringIndexScan) Description copied from interface:AccessPath
Set whether or not to consider a covering index scan on the optimizable.- Specified by:
setCoveringIndexScan
in interfaceAccessPath
- See Also:
-
getCoveringIndexScan
public boolean getCoveringIndexScan()Description copied from interface:AccessPath
Return whether or not the optimizer is considering a covering index scan on this AccessPath.- Specified by:
getCoveringIndexScan
in interfaceAccessPath
- Returns:
- boolean Whether or not the optimizer chose a covering index scan.
- See Also:
-
setNonMatchingIndexScan
public void setNonMatchingIndexScan(boolean nonMatchingIndexScan) Description copied from interface:AccessPath
Set whether or not to consider a non-matching index scan on this AccessPath.- Specified by:
setNonMatchingIndexScan
in interfaceAccessPath
- See Also:
-
getNonMatchingIndexScan
public boolean getNonMatchingIndexScan()Description copied from interface:AccessPath
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.- Specified by:
getNonMatchingIndexScan
in interfaceAccessPath
- Returns:
- boolean Whether or not the optimizer is considering a non-matching index scan.
- See Also:
-
setJoinStrategy
Description copied from interface:AccessPath
Remember the given join strategy- Specified by:
setJoinStrategy
in interfaceAccessPath
- Parameters:
joinStrategy
- The best join strategy- See Also:
-
getJoinStrategy
Description copied from interface:AccessPath
Get the join strategy, as set by setJoinStrategy().- Specified by:
getJoinStrategy
in interfaceAccessPath
- See Also:
-
setLockMode
public void setLockMode(int lockMode) Description copied from interface:AccessPath
Set the lock mode- Specified by:
setLockMode
in interfaceAccessPath
- See Also:
-
getLockMode
public int getLockMode()Description copied from interface:AccessPath
Get the lock mode, as last set in setLockMode().- Specified by:
getLockMode
in interfaceAccessPath
- See Also:
-
copy
Description copied from interface:AccessPath
Copy all information from the given AccessPath to this one.- Specified by:
copy
in interfaceAccessPath
- See Also:
-
getOptimizer
Description copied from interface:AccessPath
Get the optimizer associated with this access path.- Specified by:
getOptimizer
in interfaceAccessPath
- Returns:
- The optimizer associated with this access path.
- See Also:
-
toString
-
initializeAccessPathName
public void initializeAccessPathName(DataDictionary dd, TableDescriptor td) throws StandardException Description copied from interface:AccessPath
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.- Specified by:
initializeAccessPathName
in interfaceAccessPath
- Parameters:
dd
- Datadictionary.td
- TableDescriptor of the base table.- Throws:
StandardException
- on error.- See Also:
-