| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| 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)Divide up the predicates into different lists for different phases of the operation. |
| public boolean | Returns: Whether or not materialization is built in to the join strategyIs 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)Get the estimated cost for the join. |
| public boolean | Returns: true means the strategy is feasible, false means it isn'tThe inner table of the join innerTable, OptimizablePredicateList The predicateList for the join predList, Optimizer The optimizer to use optimizer)Is this join strategy feasible under the circumstances? |
| public OptimizablePredicateList | Returns: The base predicate list. If no predicates are pulled, it may return the source predList without doing anything.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)Get the base predicates for this join strategy. |
| public String | |
| public String | |
| public int | Returns: Count of the expressions pushed to use as the parameters to the result set for the inner tableThe 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 acb, 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)Get the appropriate arguments to the scan for this type of join. |
| public String | |
| public boolean | |
| public boolean | Returns: Whether or not this strategy is a form of hash join.Is this a form of hash join? |
| public String | |
| public int | Returns: The maximum number of rows that can be handled by this join strategymaximum number of bytes per table maxMemoryPerTable, double number of bytes per row perRowUsage)
|
| public boolean | multiplyBaseCostByOuterRows()
Returns true if the base cost of scanning the conglomerate should be multiplied by the number of outer rows. |
| public double | Returns: The extra selectivity due to non-base predicatesThe 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)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)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)Get the name of the result set method for base table scans |
| public int |
| bulkFetchOK | back to summary |
|---|---|
| public boolean bulkFetchOK() Is it OK to use bulk fetch with this join strategy? | |
| divideUpPredicateLists | back to summary |
|---|---|
| public void divideUpPredicateLists(Optimizable innerTable, OptimizablePredicateList originalRestrictionList, OptimizablePredicateList storeRestrictionList, OptimizablePredicateList nonStoreRestrictionList, OptimizablePredicateList requalificationRestrictionList, DataDictionary dd) throws StandardException 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() 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) throws StandardException Get the estimated cost for the join.
| |
| feasible | back to summary |
|---|---|
| public boolean feasible(Optimizable innerTable, OptimizablePredicateList predList, Optimizer optimizer) throws StandardException Is this join strategy feasible under the circumstances?
| |
| getBasePredicates | back to summary |
|---|---|
| public OptimizablePredicateList getBasePredicates(OptimizablePredicateList predList, OptimizablePredicateList basePredicates, Optimizable innerTable) throws StandardException 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() Get the name of this join strategy | |
| getOperatorSymbol | back to summary |
|---|---|
| public String getOperatorSymbol() 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 acb, int bulkFetch, int resultRowTemplate, int colRefItem, int indexColItem, int lockMode, boolean tableLocked, int isolationLevel, int maxMemoryPerTable, boolean genInListVals) throws StandardException Get the appropriate arguments to the scan for this type of join.
| |
| halfOuterJoinResultSetMethodName | back to summary |
|---|---|
| public String halfOuterJoinResultSetMethodName() Get the name of the join result set method for the half outerjoin | |
| ignoreBulkFetch | back to summary |
|---|---|
| public boolean ignoreBulkFetch() Should we just ignore bulk fetch with this join strategy? | |
| isHashJoin | back to summary |
|---|---|
| public boolean isHashJoin() Is this a form of hash join?
| |
| joinResultSetMethodName | back to summary |
|---|---|
| public String joinResultSetMethodName() 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)
| |
| multiplyBaseCostByOuterRows | back to summary |
|---|---|
| public boolean multiplyBaseCostByOuterRows() 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) throws StandardException 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 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) Get the name of the result set method for base table scans
| |
| scanCostType | back to summary |
|---|---|
| public int scanCostType() Get the costing type, for use with StoreCostController.getScanCost | |