| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | divideUpPredicateLists(Optimizable
The inner table of the join innerTable, OptimizablePredicateList Initially contains all predicates.
This method removes predicates from
this list and moves them to other
lists, as appropriate. originalRestrictionList, OptimizablePredicateList To be filled in with predicates to
be pushed down to store. storeRestrictionList, OptimizablePredicateList To be filled in with predicates
that are not pushed down to the
store. nonStoreRestrictionList, OptimizablePredicateList Copy of predicates used to
re-qualify rows, if necessary. requalificationRestrictionList, DataDictionary The DataDictionary dd)Implements org. Divide up the predicates into different lists for different phases of the operation. |
| public boolean | doesMaterialization()
Implements org. Is materialization built in to the join strategy? |
| public void | estimateCost(Optimizable
The inner table to join with innerTable, OptimizablePredicateList The predicate list for the join predList, ConglomerateDescriptor The conglomerate descriptor (if appropriate) to get
the cost of cd, CostEstimate The estimated cost of the part of the plan outer
to the inner table outerCost, Optimizer The optimizer to use to help estimate the cost optimizer, CostEstimate The estimated cost of doing a single scan of the
inner table, to be filled in with the cost of
doing the join. costEstimate)Implements org. Get the estimated cost for the join. |
| public boolean | feasible(Optimizable
The inner table of the join innerTable, OptimizablePredicateList The predicateList for the join predList, Optimizer The optimizer to use optimizer)Implements org. Is this join strategy feasible under the circumstances? |
| public OptimizablePredicateList | getBasePredicates(OptimizablePredicateList
The predicate list to pull from. predList, OptimizablePredicateList The list to put the base predicates in. basePredicates, Optimizable The inner table of the join innerTable)Implements org. Get the base predicates for this join strategy. |
| public String | getName()
Implements org. Get the name of this join strategy |
| public String | getOperatorSymbol()
Implements org. Get the operator symbol used to represent this join strategy in optimizer traces |
| public int | getScanArgs(TransactionController
The TransactionController tc, MethodBuilder The method to generate the arguments in mb, Optimizable The inner table of the join innerTable, OptimizablePredicateList The predicate list to be evaluated in the
store storeRestrictionList, OptimizablePredicateList The predicate list to be evaluated
outside of the store nonStoreRestrictionList, ExpressionClassBuilderInterface The expression class builder for the activation class
we're building acbi, int The amount of bulk fetch to do bulkFetch, int The saved object index of a result row template resultRowTemplate, int The item number of the column reference bit map colRefItem, int indexColItem, int The lock mode to use when scanning the table
(see TransactionController). lockMode, boolean Whether or not the table is marked (in sys.systables)
as always using table locking tableLocked, int Isolation level specified (or not) for scans isolationLevel, int Max memory per table maxMemoryPerTable, boolean Whether or not we are going to generate IN-list
values with which to probe the inner table. genInListVals)Implements org. Get the appropriate arguments to the scan for this type of join. |
| public String | halfOuterJoinResultSetMethodName()
Implements org. Get the name of the join result set method for the half outerjoin |
| public String | joinResultSetMethodName()
Implements org. Get the name of the join result set method for the join |
| public int | maxCapacity(int userSpecifiedCapacity, int
maximum number of bytes per table maxMemoryPerTable, double number of bytes per row perRowUsage)Implements org.
|
| public boolean | multiplyBaseCostByOuterRows()
Implements org. Returns true if the base cost of scanning the conglomerate should be multiplied by the number of outer rows. |
| public double | nonBasePredicateSelectivity(Optimizable
The inner table of the join. innerTable, OptimizablePredicateList The original predicate list that was passed to
getBasePredicates(), from which some base predicates
may have been pulled. predList)Implements org. Get the extra selectivity of the non-base predicates (those that were left in the predicate list by getBasePredicates() that are not applied to the scan of the base conglomerate. |
| public void | putBasePredicates(OptimizablePredicateList
The list of predicates to put the base predicates
back in. predList, OptimizablePredicateList The base predicates to put back in the list. basePredicates)Implements org. Put back and base predicates that were removed from the list by getBasePredicates (see above). |
| public String | resultSetMethodName(boolean
True means bulk fetch is being done on the inner table bulkFetch, boolean True means we are probing the inner table for rows
matching a specified list of values. multiprobe, boolean True of this is a special scan to
validate a check constraint. validatingCheckConstraint)Implements org. Get the name of the result set method for base table scans |
| public int | scanCostType()
Implements org. Get the costing type, for use with StoreCostController.getScanCost |
| public String | |
| protected boolean | Returns: Whether or not this join strategy can be used on the outermost table of a join.Overrides org. Can this join strategy be used on the outermost table of a join. |
| NestedLoopJoinStrategy | back to summary |
|---|---|
| pack-priv NestedLoopJoinStrategy() | |
| divideUpPredicateLists | back to summary |
|---|---|
| public void divideUpPredicateLists(Optimizable innerTable, OptimizablePredicateList originalRestrictionList, OptimizablePredicateList storeRestrictionList, OptimizablePredicateList nonStoreRestrictionList, OptimizablePredicateList requalificationRestrictionList, DataDictionary dd) throws StandardException Implements org. Doc from org. Divide up the predicates into different lists for different phases of the operation. When this method is called, all of the predicates will be in restrictionList. The effect of this method is to remove all of the predicates from restrictionList except those that will be pushed down to the store as start/stop predicates or Qualifiers. The remaining predicates will be put into nonBaseTableRestrictionList. All predicate lists will be ordered as necessary for use with the conglomerate. Some operations (like hash join) materialize results, and so require requalification of rows when doing a non-covering index scan. The predicates to use for requalification are copied into baseTableRestrictionList.
| |
| doesMaterialization | back to summary |
|---|---|
| public boolean doesMaterialization() Implements org. Doc from org. Is materialization built in to the join strategy?
| |
| estimateCost | back to summary |
|---|---|
| public void estimateCost(Optimizable innerTable, OptimizablePredicateList predList, ConglomerateDescriptor cd, CostEstimate outerCost, Optimizer optimizer, CostEstimate costEstimate) Implements org. Doc from org. Get the estimated cost for the join.
| |
| feasible | back to summary |
|---|---|
| public boolean feasible(Optimizable innerTable, OptimizablePredicateList predList, Optimizer optimizer) throws StandardException Implements org. Doc from org. Is this join strategy feasible under the circumstances?
| |
| getBasePredicates | back to summary |
|---|---|
| public OptimizablePredicateList getBasePredicates(OptimizablePredicateList predList, OptimizablePredicateList basePredicates, Optimizable innerTable) throws StandardException Implements org. Doc from org. Get the base predicates for this join strategy. The base predicates are the ones that can be used while scanning the table. For some join strategies (for example, nested loop), all predicates are base predicates. For other join strategies (for example, hash join), the base predicates are those that involve comparisons with constant expressions. Also, order the base predicates according to the order in the proposed conglomerate descriptor for the inner table.
| |
| getName | back to summary |
|---|---|
| public String getName() Implements org. Doc from org. Get the name of this join strategy
| |
| getOperatorSymbol | back to summary |
|---|---|
| public String getOperatorSymbol() Implements org. Doc from org. Get the operator symbol used to represent this join strategy in optimizer traces
| |
| getScanArgs | back to summary |
|---|---|
| public int getScanArgs(TransactionController tc, MethodBuilder mb, Optimizable innerTable, OptimizablePredicateList storeRestrictionList, OptimizablePredicateList nonStoreRestrictionList, ExpressionClassBuilderInterface acbi, int bulkFetch, int resultRowTemplate, int colRefItem, int indexColItem, int lockMode, boolean tableLocked, int isolationLevel, int maxMemoryPerTable, boolean genInListVals) throws StandardException Implements org. Doc from org. Get the appropriate arguments to the scan for this type of join.
| |
| halfOuterJoinResultSetMethodName | back to summary |
|---|---|
| public String halfOuterJoinResultSetMethodName() Implements org. Doc from org. Get the name of the join result set method for the half outerjoin | |
| joinResultSetMethodName | back to summary |
|---|---|
| public String joinResultSetMethodName() Implements org. Doc from org. Get the name of the join result set method for the join
| |
| maxCapacity | back to summary |
|---|---|
| public int maxCapacity(int userSpecifiedCapacity, int maxMemoryPerTable, double perRowUsage) Implements org.
| |
| multiplyBaseCostByOuterRows | back to summary |
|---|---|
| public boolean multiplyBaseCostByOuterRows() Implements org. Doc from org. Returns true if the base cost of scanning the conglomerate should be multiplied by the number of outer rows. | |
| nonBasePredicateSelectivity | back to summary |
|---|---|
| public double nonBasePredicateSelectivity(Optimizable innerTable, OptimizablePredicateList predList) Implements org. Doc from org. Get the extra selectivity of the non-base predicates (those that were left in the predicate list by getBasePredicates() that are not applied to the scan of the base conglomerate. Note For some types of join strategy, it may not remove any predicates from the original predicate list. The join strategy is expected to know when it does this, and to return 1.0 as the extra selectivity in these cases.
| |
| putBasePredicates | back to summary |
|---|---|
| public void putBasePredicates(OptimizablePredicateList predList, OptimizablePredicateList basePredicates) throws StandardException Implements org. Doc from org. Put back and base predicates that were removed from the list by getBasePredicates (see above). Note Those join strategies that treat all predicates as base predicates may treat the get and put methods as no-ops.
| |
| resultSetMethodName | back to summary |
|---|---|
| public String resultSetMethodName(boolean bulkFetch, boolean multiprobe, boolean validatingCheckConstraint) Implements org. Doc from org. Get the name of the result set method for base table scans
| |
| scanCostType | back to summary |
|---|---|
| public int scanCostType() Implements org. Doc from org. Get the costing type, for use with StoreCostController.getScanCost
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| validForOutermostTable | back to summary |
|---|---|
| protected boolean validForOutermostTable() Overrides org. Can this join strategy be used on the outermost table of a join.
| |