Interface OptTrace
- All Known Implementing Classes:
DefaultOptTrace, XMLOptTrace
public interface OptTrace
Interface for optimizer tracing.
-
Method Summary
Modifier and TypeMethodDescriptionvoidprintToWriter(PrintWriter out) Print the trace so far.voidtraceAddingUnorderedOptimizable(int predicateCount) Say that we're adding an unordered optimizable.voidtraceChangingAccessPathForTable(int tableNumber) Say that we're considering a different access path for a table.voidtraceCheapestPlanSoFar(int planType, CostEstimate currentCost) Report the cost of the cheapest plan so far.voidSay that we have a complete join order.voidtraceCompositeSelectivityFromStatistics(double statCompositeSelectivity) Report the selectivity calculated from SYSSTATISTICS.voidtraceConsideringConglomerate(ConglomerateDescriptor cd, int tableNumber) Report that we are considering a conglomerate for a table.voidtraceConsideringJoinStrategy(JoinStrategy js, int tableNumber) Say that we're considering a particular join strategy on a particular table.voidSay that we're setting the lock mode to MODE_RECORD because the start and stop positions are all constant.voidtraceCostIncludingCompositeSelectivityFromStats(CostEstimate cost, int tableNumber) Report the cost based on selectivities coming out of SYSSTATISTICS.voidtraceCostIncludingExtra1stColumnSelectivity(CostEstimate cost, int tableNumber) Report the cost of a scan given the selectivity of an extra first column.voidtraceCostIncludingExtraNonQualifierSelectivity(CostEstimate cost, int tableNumber) Report the cost if we include an extra non-qualifier.voidtraceCostIncludingExtraQualifierSelectivity(CostEstimate cost, int tableNumber) Report the cost if we include an extra qualifier.voidtraceCostIncludingExtraStartStop(CostEstimate cost, int tableNumber) Report the cost if we include an extra start/stop.voidtraceCostIncludingStatsForIndex(CostEstimate cost, int tableNumber) Report the cost based on index statistics.voidtraceCostOfConglomerateScan(int tableNumber, ConglomerateDescriptor cd, CostEstimate costEstimate, int numExtraFirstColumnPreds, double extraFirstColumnSelectivity, int numExtraStartStopPreds, double extraStartStopSelectivity, int startStopPredCount, double statStartStopSelectivity, int numExtraQualifiers, double extraQualifierSelectivity, int numExtraNonQualifiers, double extraNonQualifierSelectivity) Report the cost of a conglomerate scan.voidtraceCostOfNoncoveringIndex(CostEstimate cost, int tableNumber) Report the cost of using a non-covering index.voidtraceCostOfNScans(int tableNumber, double rowCount, CostEstimate cost) Report the cost of scanning a table a certain number of timesvoidtraceCostWithoutSortAvoidance(CostEstimate currentCost) Report the cost without a sort.voidtraceCostWithSortAvoidance(CostEstimate currentSortAvoidanceCost) Report the cost with sort avoidance.voidtraceCurrentPlanAvoidsSort(CostEstimate bestCost, CostEstimate currentSortAvoidanceCost) Say that the current plan avoids a sort.voidEnd tracing the optimization of a query block.voidtraceEstimatingCostOfConglomerate(ConglomerateDescriptor cd, int tableNumber) Report the cost of using a particular conglomerate to scan a table.voidtraceHashKeyColumns(int[] hashKeyColumns) Report the columns being tracedvoidSay that the user specified an impossible join order.voidtraceJoinOrderConsideration(int joinPosition, int[] proposedJoinOrder, JBitSet assignedTableMap) Say that we're considering a join order.voidtraceLookingForSpecifiedIndex(String indexName, int tableNumber) Say that we're looking for an index specified by optimizer hints.voidtraceModifyingAccessPaths(int optimizerID) Say that we're modifying access paths.voidtraceNextAccessPath(String baseTable, int predicateCount) Report that we are advancing to the next access path for the table.voidSay that we couldn't find a best plan.voidtraceNoMoreConglomerates(int tableNumber) Say that we have exhausted the conglomerate possibilities for a table.voidtraceNonCoveringIndexCost(double cost, int tableNumber) Say that we're considering a non-covering index.voidSay that we're setting the lock mode to MODE_TABLE because there is no start/stop position.voidSay that we're starting to optimize a join nodevoidtraceRememberingBestAccessPath(AccessPath accessPath, int tableNumber, int planType) Report that we've found a best access path.voidtraceRememberingBestAccessPathSubstring(AccessPath ap, int tableNumber) Report the best access path for the table so far.voidtraceRememberingBestJoinOrder(int joinPosition, int[] bestJoinOrder, int planType, CostEstimate planCost, JBitSet assignedTableMap) Say that we are remembering the current plan as the best join order so far.voidtraceRememberingBestSortAvoidanceAccessPathSubstring(AccessPath ap, int tableNumber) Report the best sort-avoiding access path for this table so far.voidtraceRememberingBestUnknownAccessPathSubstring(AccessPath ap, int tableNumber) Report an optimizer failure, e.g., while optimizing an outer joinvoidtraceRememberingJoinStrategy(JoinStrategy joinStrategy, int tableNumber) Say that we've found a new best join strategy for the table.voidSay that we're considering scanning a heap even though we have a unique key match.voidtraceShortCircuiting(boolean timeExceeded, Optimizable thisOpt, int joinPosition) Say that we short-circuited a join order.voidtraceSingleMatchedRowCost(double cost, int tableNumber) Report the cost of a scan which will match exactly one row.voidSay we won't consider a hash join because there are no hash key columns.voidtraceSkippingBecauseTooMuchMemory(int maxMemoryPerTable) Say that we are skipping a plan because it consumes too much memory.voidtraceSkippingJoinOrder(int nextOptimizable, int joinPosition, int[] proposedJoinOrder, JBitSet assignedTableMap) Say that we're skipping the join order starting with the next optimizable.voidSay that we won't consider a hash join because the result can't be materializedvoidtraceSortCost(CostEstimate sortCost, CostEstimate currentCost) Report the sort cost.voidtraceSortNeededForOrdering(int planType, RequiredRowOrdering requiredRowOrdering) Report that this plan needs a sortvoidtraceStartQueryBlock(long timeOptimizationStarted, int optimizerID, OptimizableList optimizableList) Start optimizer tracing for a query block.voidtraceStartStatement(String statementText) Start the start of tracing a statement.voidtraceTimeout(long currentTime, CostEstimate bestCost) Say that the optimizer ran out of time.voidSay that we have optimized the user-specified join order.voidSay that there's nothing to optimizer.
-
Method Details
-
traceStartStatement
Start the start of tracing a statement. -
traceStartQueryBlock
void traceStartQueryBlock(long timeOptimizationStarted, int optimizerID, OptimizableList optimizableList) Start optimizer tracing for a query block. -
traceEndQueryBlock
void traceEndQueryBlock()End tracing the optimization of a query block. -
traceTimeout
Say that the optimizer ran out of time. -
traceVacuous
void traceVacuous()Say that there's nothing to optimizer. -
traceCompleteJoinOrder
void traceCompleteJoinOrder()Say that we have a complete join order. -
traceSortCost
Report the sort cost. -
traceNoBestPlan
void traceNoBestPlan()Say that we couldn't find a best plan. -
traceModifyingAccessPaths
void traceModifyingAccessPaths(int optimizerID) Say that we're modifying access paths. -
traceShortCircuiting
Say that we short-circuited a join order. -
traceSkippingJoinOrder
void traceSkippingJoinOrder(int nextOptimizable, int joinPosition, int[] proposedJoinOrder, JBitSet assignedTableMap) Say that we're skipping the join order starting with the next optimizable. -
traceIllegalUserJoinOrder
void traceIllegalUserJoinOrder()Say that the user specified an impossible join order. -
traceUserJoinOrderOptimized
void traceUserJoinOrderOptimized()Say that we have optimized the user-specified join order. -
traceJoinOrderConsideration
void traceJoinOrderConsideration(int joinPosition, int[] proposedJoinOrder, JBitSet assignedTableMap) Say that we're considering a join order. -
traceCostWithoutSortAvoidance
Report the cost without a sort. -
traceCostWithSortAvoidance
Report the cost with sort avoidance. -
traceCurrentPlanAvoidsSort
Say that the current plan avoids a sort. -
traceCheapestPlanSoFar
Report the cost of the cheapest plan so far. -
traceSortNeededForOrdering
Report that this plan needs a sort -
traceRememberingBestJoinOrder
void traceRememberingBestJoinOrder(int joinPosition, int[] bestJoinOrder, int planType, CostEstimate planCost, JBitSet assignedTableMap) Say that we are remembering the current plan as the best join order so far. -
traceSkippingBecauseTooMuchMemory
void traceSkippingBecauseTooMuchMemory(int maxMemoryPerTable) Say that we are skipping a plan because it consumes too much memory. -
traceCostOfNScans
Report the cost of scanning a table a certain number of times -
traceSkipUnmaterializableHashJoin
void traceSkipUnmaterializableHashJoin()Say that we won't consider a hash join because the result can't be materialized -
traceSkipHashJoinNoHashKeys
void traceSkipHashJoinNoHashKeys()Say we won't consider a hash join because there are no hash key columns. -
traceHashKeyColumns
void traceHashKeyColumns(int[] hashKeyColumns) Report the columns being traced -
traceOptimizingJoinNode
void traceOptimizingJoinNode()Say that we're starting to optimize a join node -
traceConsideringJoinStrategy
Say that we're considering a particular join strategy on a particular table. -
traceRememberingBestAccessPath
Report that we've found a best access path. -
traceNoMoreConglomerates
void traceNoMoreConglomerates(int tableNumber) Say that we have exhausted the conglomerate possibilities for a table. -
traceConsideringConglomerate
Report that we are considering a conglomerate for a table. -
traceScanningHeapWithUniqueKey
void traceScanningHeapWithUniqueKey()Say that we're considering scanning a heap even though we have a unique key match. -
traceAddingUnorderedOptimizable
void traceAddingUnorderedOptimizable(int predicateCount) Say that we're adding an unordered optimizable. -
traceChangingAccessPathForTable
void traceChangingAccessPathForTable(int tableNumber) Say that we're considering a different access path for a table. -
traceNoStartStopPosition
void traceNoStartStopPosition()Say that we're setting the lock mode to MODE_TABLE because there is no start/stop position. -
traceNonCoveringIndexCost
void traceNonCoveringIndexCost(double cost, int tableNumber) Say that we're considering a non-covering index. -
traceConstantStartStopPositions
void traceConstantStartStopPositions()Say that we're setting the lock mode to MODE_RECORD because the start and stop positions are all constant. -
traceEstimatingCostOfConglomerate
Report the cost of using a particular conglomerate to scan a table. -
traceLookingForSpecifiedIndex
Say that we're looking for an index specified by optimizer hints. -
traceSingleMatchedRowCost
void traceSingleMatchedRowCost(double cost, int tableNumber) Report the cost of a scan which will match exactly one row. -
traceCostIncludingExtra1stColumnSelectivity
Report the cost of a scan given the selectivity of an extra first column. -
traceNextAccessPath
Report that we are advancing to the next access path for the table. -
traceCostIncludingExtraStartStop
Report the cost if we include an extra start/stop. -
traceCostIncludingExtraQualifierSelectivity
Report the cost if we include an extra qualifier. -
traceCostIncludingExtraNonQualifierSelectivity
Report the cost if we include an extra non-qualifier. -
traceCostOfNoncoveringIndex
Report the cost of using a non-covering index. -
traceRememberingJoinStrategy
Say that we've found a new best join strategy for the table. -
traceRememberingBestAccessPathSubstring
Report the best access path for the table so far. -
traceRememberingBestSortAvoidanceAccessPathSubstring
Report the best sort-avoiding access path for this table so far. -
traceRememberingBestUnknownAccessPathSubstring
Report an optimizer failure, e.g., while optimizing an outer join -
traceCostOfConglomerateScan
void traceCostOfConglomerateScan(int tableNumber, ConglomerateDescriptor cd, CostEstimate costEstimate, int numExtraFirstColumnPreds, double extraFirstColumnSelectivity, int numExtraStartStopPreds, double extraStartStopSelectivity, int startStopPredCount, double statStartStopSelectivity, int numExtraQualifiers, double extraQualifierSelectivity, int numExtraNonQualifiers, double extraNonQualifierSelectivity) Report the cost of a conglomerate scan. -
traceCostIncludingCompositeSelectivityFromStats
Report the cost based on selectivities coming out of SYSSTATISTICS. -
traceCompositeSelectivityFromStatistics
void traceCompositeSelectivityFromStatistics(double statCompositeSelectivity) Report the selectivity calculated from SYSSTATISTICS. -
traceCostIncludingStatsForIndex
Report the cost based on index statistics. -
printToWriter
Print the trace so far.
-