|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Optimizer
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. |
CostEstimate |
getFinalCost()
Get the final estimated cost of the optimized query. |
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 |
prepForNextRound()
Prepare for another round of optimization. |
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 |
---|
static final java.lang.String MODULE
static final java.lang.String JOIN_ORDER_OPTIMIZATION
static final java.lang.String RULE_BASED_OPTIMIZATION
static final java.lang.String NO_TIMEOUT
static final java.lang.String MAX_MEMORY_PER_TABLE
static final int MAX_DYNAMIC_MATERIALIZED_ROWS
static final java.lang.String USE_STATISTICS
static final int NORMAL_PLAN
static final int SORT_AVOIDANCE_PLAN
static final int STARTED
static final int TIME_EXCEEDED
static final int NO_TABLES
static final int COMPLETE_JOIN_ORDER
static final int COST_OF_SORTING
static final int NO_BEST_PLAN
static final int MODIFYING_ACCESS_PATHS
static final int SHORT_CIRCUITING
static final int SKIPPING_JOIN_ORDER
static final int ILLEGAL_USER_JOIN_ORDER
static final int USER_JOIN_ORDER_OPTIMIZED
static final int CONSIDERING_JOIN_ORDER
static final int TOTAL_COST_NON_SA_PLAN
static final int TOTAL_COST_SA_PLAN
static final int TOTAL_COST_WITH_SORTING
static final int CURRENT_PLAN_IS_SA_PLAN
static final int CHEAPEST_PLAN_SO_FAR
static final int PLAN_TYPE
static final int COST_OF_CHEAPEST_PLAN_SO_FAR
static final int SORT_NEEDED_FOR_ORDERING
static final int REMEMBERING_BEST_JOIN_ORDER
static final int SKIPPING_DUE_TO_EXCESS_MEMORY
static final int COST_OF_N_SCANS
static final int HJ_SKIP_NOT_MATERIALIZABLE
static final int HJ_SKIP_NO_JOIN_COLUMNS
static final int HJ_HASH_KEY_COLUMNS
static final int CALLING_ON_JOIN_NODE
static final int CONSIDERING_JOIN_STRATEGY
static final int REMEMBERING_BEST_ACCESS_PATH
static final int NO_MORE_CONGLOMERATES
static final int CONSIDERING_CONGLOMERATE
static final int SCANNING_HEAP_FULL_MATCH_ON_UNIQUE_KEY
static final int ADDING_UNORDERED_OPTIMIZABLE
static final int CHANGING_ACCESS_PATH_FOR_TABLE
static final int TABLE_LOCK_NO_START_STOP
static final int NON_COVERING_INDEX_COST
static final int ROW_LOCK_ALL_CONSTANT_START_STOP
static final int ESTIMATING_COST_OF_CONGLOMERATE
static final int LOOKING_FOR_SPECIFIED_INDEX
static final int MATCH_SINGLE_ROW_COST
static final int COST_INCLUDING_EXTRA_1ST_COL_SELECTIVITY
static final int CALLING_NEXT_ACCESS_PATH
static final int TABLE_LOCK_OVER_THRESHOLD
static final int ROW_LOCK_UNDER_THRESHOLD
static final int COST_INCLUDING_EXTRA_START_STOP
static final int COST_INCLUDING_EXTRA_QUALIFIER_SELECTIVITY
static final int COST_INCLUDING_EXTRA_NONQUALIFIER_SELECTIVITY
static final int COST_OF_NONCOVERING_INDEX
static final int REMEMBERING_JOIN_STRATEGY
static final int REMEMBERING_BEST_ACCESS_PATH_SUBSTRING
static final int REMEMBERING_BEST_SORT_AVOIDANCE_ACCESS_PATH_SUBSTRING
static final int REMEMBERING_BEST_UNKNOWN_ACCESS_PATH_SUBSTRING
static final int COST_OF_CONGLOMERATE_SCAN1
static final int COST_OF_CONGLOMERATE_SCAN2
static final int COST_OF_CONGLOMERATE_SCAN3
static final int COST_OF_CONGLOMERATE_SCAN4
static final int COST_OF_CONGLOMERATE_SCAN5
static final int COST_OF_CONGLOMERATE_SCAN6
static final int COST_OF_CONGLOMERATE_SCAN7
static final int COST_INCLUDING_COMPOSITE_SEL_FROM_STATS
static final int COMPOSITE_SEL_FROM_STATS
static final int COST_INCLUDING_STATS_FOR_INDEX
Method Detail |
---|
boolean getNextPermutation() throws StandardException
StandardException
- Thrown on errorboolean getNextDecoratedPermutation() throws StandardException
StandardException
- Thrown on errorvoid costPermutation() throws StandardException
StandardException
- Thrown on errorvoid 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 errorvoid 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 errorDataDictionary getDataDictionary()
void modifyAccessPaths() throws StandardException
StandardException
- Thrown on errorCostEstimate newCostEstimate()
CostEstimate getOptimizedCost()
CostEstimate getFinalCost()
void prepForNextRound()
void setOuterRows(double outerRowCount)
int getNumberOfJoinStrategies()
int tableLockThreshold()
JoinStrategy getJoinStrategy(int whichStrategy)
JoinStrategy getJoinStrategy(java.lang.String whichStrategy)
void trace(int traceFlag, int intParam1, int intParam2, double doubleParam, java.lang.Object objectParam1)
int getLevel()
double uniqueJoinWithOuterTable(OptimizablePredicateList predList) throws StandardException
predList
- The predicate list to check
StandardException
- Thrown on errorboolean useStatistics()
USE_STATISTICS
int getMaxMemoryPerTable()
|
Built on Thu 2011-03-10 11:54:14+0000, from revision ??? | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |