|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Optimizer provides services for optimizing a query. RESOLVE: o Need to figure out what to do about subqueries, figuring out their attachment points and how to communicate them back to the caller.
Method Summary | |
void |
considerCost(Optimizable optimizable,
OptimizablePredicateList predList,
CostEstimate estimatedCost,
CostEstimate outerCost)
Consider the cost of the given optimizable. |
void |
costOptimizable(Optimizable optimizable,
TableDescriptor td,
ConglomerateDescriptor cd,
OptimizablePredicateList predList,
CostEstimate outerCost)
Cost the current Optimizable with the specified OPL. |
void |
costPermutation()
Cost the current permutation. |
DataDictionary |
getDataDictionary()
Return the DataDictionary that the Optimizer is using. |
JoinStrategy |
getJoinStrategy(int whichStrategy)
Gets a join strategy by number (zero-based). |
JoinStrategy |
getJoinStrategy(java.lang.String whichStrategy)
Gets a join strategy by name. |
int |
getLevel()
Get the level of this optimizer. |
int |
getMaxMemoryPerTable()
|
boolean |
getNextDecoratedPermutation()
Iterate through the "decorated permutations", returning false when they are exhausted. |
boolean |
getNextPermutation()
Iterate through the permutations, returning false when the permutations are exhausted. |
int |
getNumberOfJoinStrategies()
Get the number of join strategies supported by this optimizer. |
CostEstimate |
getOptimizedCost()
Get the estimated cost of the optimized query |
void |
modifyAccessPaths()
Modify the access path for each Optimizable, as necessary. |
CostEstimate |
newCostEstimate()
Get a new CostEstimate object |
void |
setOuterRows(double outerRowCount)
Set the estimated number of outer rows - good for optimizing nested optimizables like subqueries and join nodes. |
int |
tableLockThreshold()
Get the maximum number of estimated rows touched in a table before we decide to open the table with table locking (as opposed to row locking. |
void |
trace(int traceFlag,
int intParam1,
int intParam2,
double doubleParam,
java.lang.Object objectParam1)
Optimizer trace. |
double |
uniqueJoinWithOuterTable(OptimizablePredicateList predList)
Tells whether any of the tables outer to the current one has a uniqueness condition on the given predicate list, and if so, how many times each unique key can be seen by the current table. |
boolean |
useStatistics()
If statistics should be considered by the optimizer while optimizing a query. |
Field Detail |
public static final java.lang.String MODULE
public static final java.lang.String JOIN_ORDER_OPTIMIZATION
public static final java.lang.String RULE_BASED_OPTIMIZATION
public static final java.lang.String NO_TIMEOUT
public static final java.lang.String MAX_MEMORY_PER_TABLE
public static final java.lang.String USE_STATISTICS
public static final int NORMAL_PLAN
public static final int SORT_AVOIDANCE_PLAN
public static final int STARTED
public static final int TIME_EXCEEDED
public static final int NO_TABLES
public static final int COMPLETE_JOIN_ORDER
public static final int COST_OF_SORTING
public static final int NO_BEST_PLAN
public static final int MODIFYING_ACCESS_PATHS
public static final int SHORT_CIRCUITING
public static final int SKIPPING_JOIN_ORDER
public static final int ILLEGAL_USER_JOIN_ORDER
public static final int USER_JOIN_ORDER_OPTIMIZED
public static final int CONSIDERING_JOIN_ORDER
public static final int TOTAL_COST_NON_SA_PLAN
public static final int TOTAL_COST_SA_PLAN
public static final int TOTAL_COST_WITH_SORTING
public static final int CURRENT_PLAN_IS_SA_PLAN
public static final int CHEAPEST_PLAN_SO_FAR
public static final int PLAN_TYPE
public static final int COST_OF_CHEAPEST_PLAN_SO_FAR
public static final int SORT_NEEDED_FOR_ORDERING
public static final int REMEMBERING_BEST_JOIN_ORDER
public static final int SKIPPING_DUE_TO_EXCESS_MEMORY
public static final int COST_OF_N_SCANS
public static final int HJ_SKIP_NOT_MATERIALIZABLE
public static final int HJ_SKIP_NO_JOIN_COLUMNS
public static final int HJ_HASH_KEY_COLUMNS
public static final int CALLING_ON_JOIN_NODE
public static final int CONSIDERING_JOIN_STRATEGY
public static final int REMEMBERING_BEST_ACCESS_PATH
public static final int NO_MORE_CONGLOMERATES
public static final int CONSIDERING_CONGLOMERATE
public static final int SCANNING_HEAP_FULL_MATCH_ON_UNIQUE_KEY
public static final int ADDING_UNORDERED_OPTIMIZABLE
public static final int CHANGING_ACCESS_PATH_FOR_TABLE
public static final int TABLE_LOCK_NO_START_STOP
public static final int NON_COVERING_INDEX_COST
public static final int ROW_LOCK_ALL_CONSTANT_START_STOP
public static final int ESTIMATING_COST_OF_CONGLOMERATE
public static final int LOOKING_FOR_SPECIFIED_INDEX
public static final int MATCH_SINGLE_ROW_COST
public static final int COST_INCLUDING_EXTRA_1ST_COL_SELECTIVITY
public static final int CALLING_NEXT_ACCESS_PATH
public static final int TABLE_LOCK_OVER_THRESHOLD
public static final int ROW_LOCK_UNDER_THRESHOLD
public static final int COST_INCLUDING_EXTRA_START_STOP
public static final int COST_INCLUDING_EXTRA_QUALIFIER_SELECTIVITY
public static final int COST_INCLUDING_EXTRA_NONQUALIFIER_SELECTIVITY
public static final int COST_OF_NONCOVERING_INDEX
public static final int REMEMBERING_JOIN_STRATEGY
public static final int REMEMBERING_BEST_ACCESS_PATH_SUBSTRING
public static final int REMEMBERING_BEST_SORT_AVOIDANCE_ACCESS_PATH_SUBSTRING
public static final int REMEMBERING_BEST_UNKNOWN_ACCESS_PATH_SUBSTRING
public static final int COST_OF_CONGLOMERATE_SCAN1
public static final int COST_OF_CONGLOMERATE_SCAN2
public static final int COST_OF_CONGLOMERATE_SCAN3
public static final int COST_OF_CONGLOMERATE_SCAN4
public static final int COST_OF_CONGLOMERATE_SCAN5
public static final int COST_OF_CONGLOMERATE_SCAN6
public static final int COST_OF_CONGLOMERATE_SCAN7
public static final int COST_INCLUDING_COMPOSITE_SEL_FROM_STATS
public static final int COMPOSITE_SEL_FROM_STATS
public static final int COST_INCLUDING_STATS_FOR_INDEX
Method Detail |
public boolean getNextPermutation() throws StandardException
StandardException
- Thrown on errorpublic boolean getNextDecoratedPermutation() throws StandardException
StandardException
- Thrown on errorpublic void costPermutation() throws StandardException
StandardException
- Thrown on errorpublic void costOptimizable(Optimizable optimizable, TableDescriptor td, ConglomerateDescriptor cd, OptimizablePredicateList predList, CostEstimate outerCost) throws StandardException
optimizable
- The Optimizabletd
- TableDescriptor of the Optimizablecd
- The ConglomerateDescriptor for the conglom to cost
(This should change to an object to represent
access paths, but for now this is OK).predList
- The OptimizablePredicateList to applyouterCost
- The cost of the tables outer to the one being
optimizer - tells how many outer rows there are.
StandardException
- Thrown on errorpublic void considerCost(Optimizable optimizable, OptimizablePredicateList predList, CostEstimate estimatedCost, CostEstimate outerCost) throws StandardException
optimizable
- The OptimizablepredList
- The OptimizablePredicateList to applyestimatedCost
- The estimated cost of the given optimizableouterCost
- The cost of the tables outer to the one being
optimizer - tells how many outer rows there are.
StandardException
- Thrown on errorpublic DataDictionary getDataDictionary()
public void modifyAccessPaths() throws StandardException
StandardException
- Thrown on errorpublic CostEstimate newCostEstimate()
public CostEstimate getOptimizedCost()
public void setOuterRows(double outerRowCount)
public int getNumberOfJoinStrategies()
public int tableLockThreshold()
public JoinStrategy getJoinStrategy(int whichStrategy)
public JoinStrategy getJoinStrategy(java.lang.String whichStrategy)
public void trace(int traceFlag, int intParam1, int intParam2, double doubleParam, java.lang.Object objectParam1)
public int getLevel()
public double uniqueJoinWithOuterTable(OptimizablePredicateList predList) throws StandardException
predList
- The predicate list to check
StandardException
- Thrown on errorpublic boolean useStatistics()
USE_STATISTICS
public int getMaxMemoryPerTable()
|
Built on Mon 2007-06-04 09:58:47+0400, from revision ??? | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |