public class Level2OptimizerImpl extends OptimizerImpl
Modifier and Type | Field and Description |
---|---|
private LanguageConnectionContext |
lcc |
assignedTableMap, bestCost, bestJoinOrder, currentCost, currentSortAvoidanceCost, currentTime, dDictionary, desiredJoinOrderFound, finalCostEstimate, joinPosition, maxMemoryPerTable, nonCorrelatedTableMap, numOptimizables, numTablesInQuery, optimizableList, optimizerTrace, optimizerTraceHtml, predicateList, proposedJoinOrder, requiredRowOrdering, sortCost, timeExceeded, timeLimit, timeOptimizationStarted
ADDING_UNORDERED_OPTIMIZABLE, CALLING_NEXT_ACCESS_PATH, CALLING_ON_JOIN_NODE, CHANGING_ACCESS_PATH_FOR_TABLE, CHEAPEST_PLAN_SO_FAR, COMPLETE_JOIN_ORDER, COMPOSITE_SEL_FROM_STATS, CONSIDERING_CONGLOMERATE, CONSIDERING_JOIN_ORDER, CONSIDERING_JOIN_STRATEGY, COST_INCLUDING_COMPOSITE_SEL_FROM_STATS, COST_INCLUDING_EXTRA_1ST_COL_SELECTIVITY, COST_INCLUDING_EXTRA_NONQUALIFIER_SELECTIVITY, COST_INCLUDING_EXTRA_QUALIFIER_SELECTIVITY, COST_INCLUDING_EXTRA_START_STOP, COST_INCLUDING_STATS_FOR_INDEX, COST_OF_CHEAPEST_PLAN_SO_FAR, COST_OF_CONGLOMERATE_SCAN1, COST_OF_CONGLOMERATE_SCAN2, COST_OF_CONGLOMERATE_SCAN3, COST_OF_CONGLOMERATE_SCAN4, COST_OF_CONGLOMERATE_SCAN5, COST_OF_CONGLOMERATE_SCAN6, COST_OF_CONGLOMERATE_SCAN7, COST_OF_N_SCANS, COST_OF_NONCOVERING_INDEX, COST_OF_SORTING, CURRENT_PLAN_IS_SA_PLAN, ESTIMATING_COST_OF_CONGLOMERATE, HJ_HASH_KEY_COLUMNS, HJ_SKIP_NO_JOIN_COLUMNS, HJ_SKIP_NOT_MATERIALIZABLE, ILLEGAL_USER_JOIN_ORDER, JOIN_ORDER_OPTIMIZATION, LOOKING_FOR_SPECIFIED_INDEX, MATCH_SINGLE_ROW_COST, MAX_DYNAMIC_MATERIALIZED_ROWS, MAX_MEMORY_PER_TABLE, MODIFYING_ACCESS_PATHS, MODULE, NO_BEST_PLAN, NO_MORE_CONGLOMERATES, NO_TABLES, NO_TIMEOUT, NON_COVERING_INDEX_COST, NORMAL_PLAN, PLAN_TYPE, REMEMBERING_BEST_ACCESS_PATH, REMEMBERING_BEST_ACCESS_PATH_SUBSTRING, REMEMBERING_BEST_JOIN_ORDER, REMEMBERING_BEST_SORT_AVOIDANCE_ACCESS_PATH_SUBSTRING, REMEMBERING_BEST_UNKNOWN_ACCESS_PATH_SUBSTRING, REMEMBERING_JOIN_STRATEGY, ROW_LOCK_ALL_CONSTANT_START_STOP, ROW_LOCK_UNDER_THRESHOLD, RULE_BASED_OPTIMIZATION, SCANNING_HEAP_FULL_MATCH_ON_UNIQUE_KEY, SHORT_CIRCUITING, SKIPPING_DUE_TO_EXCESS_MEMORY, SKIPPING_JOIN_ORDER, SORT_AVOIDANCE_PLAN, SORT_NEEDED_FOR_ORDERING, STARTED, TABLE_LOCK_NO_START_STOP, TABLE_LOCK_OVER_THRESHOLD, TIME_EXCEEDED, TOTAL_COST_NON_SA_PLAN, TOTAL_COST_SA_PLAN, TOTAL_COST_WITH_SORTING, USE_STATISTICS, USER_JOIN_ORDER_OPTIMIZED
Constructor and Description |
---|
Level2OptimizerImpl(OptimizableList optimizableList,
OptimizablePredicateList predicateList,
DataDictionary dDictionary,
boolean ruleBasedOptimization,
boolean noTimeout,
boolean useStatistics,
int maxMemoryPerTable,
JoinStrategy[] joinStrategies,
int tableLockThreshold,
RequiredRowOrdering requiredRowOrdering,
int numTablesInQuery,
LanguageConnectionContext lcc) |
Modifier and Type | Method and Description |
---|---|
private java.lang.String |
bestCost() |
private java.lang.String |
buildJoinOrder(java.lang.String prefix,
boolean addJoinOrderNumber,
int joinOrderNumber,
int[] joinOrder) |
private java.lang.String |
costForTable(java.lang.Object cost,
int tableNumber) |
private java.lang.String |
costIncluding(java.lang.String selectivityType,
java.lang.Object objectParam1,
int intParam1) |
private java.lang.String |
dumpConglomerateDescriptor(ConglomerateDescriptor cd) |
int |
getLevel()
Get the level of this optimizer.
|
CostEstimateImpl |
getNewCostEstimate(double theCost,
double theRowCount,
double theSingleScanRowCount) |
private java.lang.String |
lockModeThreshold(java.lang.String lockMode,
java.lang.String relop,
double rowCount,
int threshold) |
CostEstimate |
newCostEstimate()
Get a new CostEstimate object
|
void |
trace(int traceFlag,
int intParam1,
int intParam2,
double doubleParam,
java.lang.Object objectParam1)
Optimizer trace.
|
addScopedPredicatesToList, considerCost, costOptimizable, costPermutation, getDataDictionary, getFinalCost, getJoinStrategy, getJoinStrategy, getMaxMemoryPerTable, getNextDecoratedPermutation, getNextPermutation, getNumberOfJoinStrategies, getOptimizedCost, modifyAccessPaths, prepForNextRound, pushPredicates, setOuterRows, tableLockThreshold, uniqueJoinWithOuterTable, updateBestPlanMaps, useStatistics
private LanguageConnectionContext lcc
Level2OptimizerImpl(OptimizableList optimizableList, OptimizablePredicateList predicateList, DataDictionary dDictionary, boolean ruleBasedOptimization, boolean noTimeout, boolean useStatistics, int maxMemoryPerTable, JoinStrategy[] joinStrategies, int tableLockThreshold, RequiredRowOrdering requiredRowOrdering, int numTablesInQuery, LanguageConnectionContext lcc) throws StandardException
StandardException
public int getLevel()
Optimizer
getLevel
in interface Optimizer
getLevel
in class OptimizerImpl
Optimizer.getLevel()
public CostEstimate newCostEstimate()
Optimizer
newCostEstimate
in interface Optimizer
newCostEstimate
in class OptimizerImpl
Optimizer.newCostEstimate()
public CostEstimateImpl getNewCostEstimate(double theCost, double theRowCount, double theSingleScanRowCount)
getNewCostEstimate
in class OptimizerImpl
public void trace(int traceFlag, int intParam1, int intParam2, double doubleParam, java.lang.Object objectParam1)
Optimizer
trace
in interface Optimizer
trace
in class OptimizerImpl
private java.lang.String costForTable(java.lang.Object cost, int tableNumber)
private java.lang.String bestCost()
private java.lang.String buildJoinOrder(java.lang.String prefix, boolean addJoinOrderNumber, int joinOrderNumber, int[] joinOrder)
private java.lang.String lockModeThreshold(java.lang.String lockMode, java.lang.String relop, double rowCount, int threshold)
private java.lang.String costIncluding(java.lang.String selectivityType, java.lang.Object objectParam1, int intParam1)
private java.lang.String dumpConglomerateDescriptor(ConglomerateDescriptor cd)
Apache Derby V10.10 Internals - Copyright © 2004,2013 The Apache Software Foundation. All Rights Reserved.