Optimizable
, Visitable
class IndexToBaseRowNode extends FromTable
ResultSetNode.QueryExpressionClauses
Modifier and Type | Field | Description |
---|---|---|
private FormatableBitSet |
allReferencedCols |
|
protected ConglomerateDescriptor |
baseCD |
|
protected boolean |
cursorTargetTable |
|
protected boolean |
forUpdate |
|
private FormatableBitSet |
heapOnlyReferencedCols |
|
private FormatableBitSet |
heapReferencedCols |
|
private FormatableBitSet |
indexReferencedCols |
|
protected PredicateList |
restrictionList |
|
protected FromBaseTable |
source |
ADD_PLAN, bestAccessPath, bestCostEstimate, bestSortAvoidancePath, correlationName, corrTableName, currentAccessPath, hashKeyColumns, initialCapacity, level, LOAD_PLAN, loadFactor, maxCapacity, origTableName, REMOVE_PLAN, tableNumber, tableProperties, trulyTheBestAccessPath, userSpecifiedJoinStrategy
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_CYCLE, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX
Constructor | Description |
---|---|
IndexToBaseRowNode(FromBaseTable source,
ConglomerateDescriptor baseCD,
ResultColumnList resultColumns,
boolean cursorTargetTable,
FormatableBitSet heapReferencedCols,
FormatableBitSet indexReferencedCols,
PredicateList restrictionList,
boolean forUpdate,
java.util.Properties tableProperties,
ContextManager cm) |
Modifier and Type | Method | Description |
---|---|---|
(package private) void |
acceptChildren(Visitor v) |
Accept the visitor for all visitable children of this node.
|
(package private) void |
adjustForSortElimination() |
Notify the underlying result set tree that the optimizer has chosen
to "eliminate" a sort.
|
(package private) void |
adjustForSortElimination(RequiredRowOrdering rowOrdering) |
Same goal as adjustForSortElimination above, but this version
takes a RequiredRowOrdering to allow nodes to adjust based on
the ORDER BY clause, if needed.
|
(package private) void |
decrementLevel(int decrement) |
Decrement (query block) level (0-based) for this FromTable.
|
boolean |
forUpdate() |
Return true if this is the target table of an update
|
(package private) void |
generate(ActivationClassBuilder acb,
MethodBuilder mb) |
Generation of an IndexToBaseRowNode creates an
IndexRowToBaseRowResultSet, which uses the RowLocation in the last
column of an index row to get the row from the base conglomerate (heap).
|
(package private) CostEstimate |
getCostEstimate() |
Get the CostEstimate for this ResultSetNode.
|
(package private) CostEstimate |
getFinalCostEstimate() |
Get the final CostEstimate for this FromTable.
|
private int[] |
getIndexColMapping() |
Fill in the column mapping for those columns coming from the index.
|
AccessPath |
getTrulyTheBestAccessPath() |
Get the best access path overall for this Optimizable.
|
(package private) boolean |
isNotExists() |
Return whether or not the underlying FBT is for NOT EXISTS.
|
(package private) boolean |
isOneRowResultSet() |
Return whether or not the underlying ResultSet tree will return
a single row, at most.
|
(package private) boolean |
isOrderedOn(ColumnReference[] crs,
boolean permuteOrdering,
java.util.List<FromBaseTable> fbtHolder) |
Return whether or not the underlying ResultSet tree
is ordered on the specified columns.
|
(package private) int |
updateTargetLockMode() |
Get the lock mode for the target of an update statement
(a delete or update).
|
assignCostEstimate, canBeOrdered, columnsAreUpdatable, considerSortAvoidancePath, convertAbsoluteToRelativeColumnPosition, cursorTargetTable, estimateCost, feasibleJoinStrategy, fillInReferencedTableMap, flatten, getBaseTableName, getBestAccessPath, getBestSortAvoidancePath, getCorrelationName, getCostEstimate, getCurrentAccessPath, getExposedName, getFromTableByName, getLevel, getMergeTableID, getName, getNumColumnsReturned, getOrigTableName, getProperties, getResultColumnsForList, getSchemaDescriptor, getSchemaDescriptor, getScratchCostEstimate, getTableDescriptor, getTableName, getTableNumber, getUserSpecifiedJoinStrategy, hashKeyColumns, hasLargeObjectColumns, hasTableNumber, initAccessPaths, initialCapacity, isBaseTable, isCoveringIndex, isFlattenableJoinNode, isJoinColumnForRightOuterJoin, isMaterializable, isOneRowScan, isTargetTable, legalJoinOrder, loadFactor, LOJ_reorderable, markUpdatableByCursor, maxCapacity, memoryUsageOK, modifyAccessPath, needsSpecialRCLBinding, nextAccessPath, optimizeIt, optimizeSubqueries, pullOptPredicates, pushExpressions, pushOptPredicate, rememberAsBest, rememberJoinStrategyAsBest, rememberSortAvoidancePath, resetJoinStrategies, setCostEstimateCost, setHashKeyColumns, setLevel, setMergeTableID, setOrigTableName, setProperties, setTableNumber, startOptimizing, supportsMultipleInstantiations, tellRowOrderingAboutConstantColumns, toString, transformOuterJoins, uniqueJoin, updateBestPlanMap, verifyProperties
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDataDictionary, getOptimizerTracer, getReferencedTableMap, getResultSetNumber, optimizerTracingIsOn
accept, addTag, addUDTUsagePriv, addUDTUsagePriv, bindOffsetFetch, bindRowMultiSet, bindUserCatalogType, bindUserType, checkReliability, checkReliability, convertDefaultNode, copyTagsFrom, createTypeDependency, debugFlush, debugPrint, disablePrivilegeCollection, formatNodeString, generateAuthorizeCheck, getBeginOffset, getClassFactory, getCompilerContext, getContext, getContextManager, getDataDictionary, getDependencyManager, getEndOffset, getExecutionFactory, getGenericConstantActionFactory, getIntProperty, getLanguageConnectionContext, getLongProperty, getNullNode, getOffsetOrderedNodes, getOptimizerFactory, getOptimizerTracer, getParameterTypes, getSchemaDescriptor, getSchemaDescriptor, getStatementType, getTableDescriptor, getTypeCompiler, getUDTDesc, isAtomic, isPrivilegeCollectionRequired, isSessionSchema, isSessionSchema, makeConstantAction, makeTableName, makeTableName, nodeHeader, optimizerTracingIsOn, orReliability, parseSearchCondition, parseStatement, printLabel, referencesSessionSchema, resolveTableToSynonym, setBeginOffset, setEndOffset, setRefActionInfo, stackPrint, taggedWith, treePrint, treePrint, verifyClassExist
addNewPredicate, assignResultSetNumber, bindExpressions, bindExpressionsWithTables, bindNonVTITables, bindResultColumns, bindResultColumns, bindTargetExpressions, bindUntypedNullsToResultColumns, bindVTITables, changeAccessPath, columnTypesAndLengthsMatch, considerMaterialization, enhanceRCLForInsert, ensurePredicateList, flattenableInFromSubquery, generateNormalizationResultSet, generateResultSet, genProjectRestrict, genProjectRestrict, genProjectRestrictForReordering, getAllResultColumns, getCandidateFinalCostEstimate, getCursorTargetTable, getFromList, getMatchingColumn, getNewCostEstimate, getOptimizer, getOptimizerImpl, getRCLForInsert, getReferencedTableMap, getResultColumns, getResultSetNumber, getScratchCostEstimate, isCursorTargetTable, isInsertSource, isPossibleDistinctScan, isStatementResultSet, isUpdatableCursor, LOJgetReferencedTables, makeResultDescription, makeResultDescriptors, markAsCursorTargetTable, markForDistinctScan, markStatementResultSet, modifyAccessPaths, modifyAccessPaths, notCursorTargetTable, notFlattenableJoin, numDistinctAggregates, optimize, parseDefault, performMaterialization, preprocess, printQueryExpressionSuffixClauses, printSubNodes, projectResultColumns, pushOffsetFetchFirst, pushOrderByList, pushQueryExpressionSuffix, referencesTarget, rejectParameters, rejectXMLValues, renameGeneratedResultNames, replaceOrForbidDefaults, returnsAtMostOneRow, setCandidateFinalCostEstimate, setCostEstimate, setCursorTargetTable, setInsertSource, setOptimizer, setReferencedTableMap, setResultColumns, setResultSetNumber, setResultToBooleanTrueNode, setScratchCostEstimate, setTableConstructorTypes, subqueryReferencesTarget, verifySelectStarSubquery
accept, addTag, taggedWith
protected FromBaseTable source
protected ConglomerateDescriptor baseCD
protected boolean cursorTargetTable
protected PredicateList restrictionList
protected boolean forUpdate
private FormatableBitSet heapReferencedCols
private FormatableBitSet indexReferencedCols
private FormatableBitSet allReferencedCols
private FormatableBitSet heapOnlyReferencedCols
IndexToBaseRowNode(FromBaseTable source, ConglomerateDescriptor baseCD, ResultColumnList resultColumns, boolean cursorTargetTable, FormatableBitSet heapReferencedCols, FormatableBitSet indexReferencedCols, PredicateList restrictionList, boolean forUpdate, java.util.Properties tableProperties, ContextManager cm)
public boolean forUpdate()
Optimizable
forUpdate
in interface Optimizable
forUpdate
in class FromTable
Optimizable.forUpdate()
public AccessPath getTrulyTheBestAccessPath()
Optimizable
getTrulyTheBestAccessPath
in interface Optimizable
getTrulyTheBestAccessPath
in class FromTable
Optimizable.getTrulyTheBestAccessPath()
CostEstimate getCostEstimate()
ResultSetNode
getCostEstimate
in class ResultSetNode
CostEstimate getFinalCostEstimate()
FromTable
getFinalCostEstimate
in class FromTable
boolean isOrderedOn(ColumnReference[] crs, boolean permuteOrdering, java.util.List<FromBaseTable> fbtHolder) throws StandardException
isOrderedOn
in class ResultSetNode
crs
- The specified ColumnReference[]permuteOrdering
- Whether or not the order of the CRs in the array can be permutedfbtHolder
- List that is to be filled with the FromBaseTableStandardException
- Thrown on errorvoid generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException
generate
in class QueryTreeNode
acb
- The ActivationClassBuilder for the class being builtmb
- the method for the method to be builtStandardException
- Thrown on errorboolean isOneRowResultSet() throws StandardException
isOneRowResultSet
in class ResultSetNode
StandardException
- Thrown on errorboolean isNotExists()
isNotExists
in class ResultSetNode
void decrementLevel(int decrement)
decrementLevel
in class FromTable
decrement
- The amount to decrement by.int updateTargetLockMode()
updateTargetLockMode
in class ResultSetNode
TransactionController
void adjustForSortElimination()
ResultSetNode
adjustForSortElimination
in class ResultSetNode
ResultSetNode.adjustForSortElimination()
void adjustForSortElimination(RequiredRowOrdering rowOrdering) throws StandardException
ResultSetNode
adjustForSortElimination
in class ResultSetNode
StandardException
ResultSetNode.adjustForSortElimination()
private int[] getIndexColMapping()
void acceptChildren(Visitor v) throws StandardException
acceptChildren
in class FromTable
v
- the visitorStandardException
- on errorApache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.