FromBaseTable, FromSubquery, ProjectRestrictNode
| Modifier and Type | Field and Description |
|---|---|
| private int | _mergeTableID
for resolving column references in MERGE statements in tough cases |
| protected static final short | |
| pack-priv AccessPathImpl | |
| protected CostEstimate | |
| private HashMap | bestPlanMap
Set of object->trulyTheBestAccessPath mappings used to keep track of which of this Optimizable's "trulyTheBestAccessPath" was the best with respect to a specific outer query or ancestor node. |
| pack-priv AccessPathImpl | |
| private boolean | |
| pack-priv String | |
| pack-priv TableName | |
| pack-priv AccessPathImpl | |
| pack-priv int[] | |
| pack-priv int | |
| private int | |
| pack-priv int | |
| protected static final short | |
| pack-priv float | |
| pack-priv int | |
| protected TableName | origTableName
the original unbound table name |
| private double | |
| protected static final short | REMOVE_PLAN
Operations that can be performed on bestPlanMap. |
| pack-priv int | |
| pack-priv Properties | |
| pack-priv AccessPathImpl | |
| protected String |
| Access | Constructor and Description |
|---|---|
| pack-priv | FromTable(String
The correlation name correlationName, Properties Properties list associated with the table tableProperties, ContextManager The context manager cm)Constructor for a table in a FROM list. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | acceptChildren(Visitor
the visitor v)Overrides org. Accept the visitor for all visitable children of this node. |
| protected void | assignCostEstimate(CostEstimate newCostEstimate)
Assign the cost estimate in this node to the given cost estimate. |
| protected boolean | |
| pack-priv boolean | Returns: true if some columns in this table are updatable.Return true if some columns in this table are updatable. |
| public boolean | considerSortAvoidancePath()
Implements org. Check whether this optimizable's sort avoidance path should be considered. |
| public int | convertAbsoluteToRelativeColumnPosition(int
The absolute 0-based column position for the column. absolutePosition)Implements org. Convert an absolute to a relative 0-based column position. |
| protected boolean | |
| pack-priv void | decrementLevel(int
The amount to decrement by. decrement)Implements abstract org. Decrement (query block) level (0-based) for this FromTable. |
| public CostEstimate | estimateCost(OptimizablePredicateList
The predicate list to optimize against predList, ConglomerateDescriptor The conglomerate descriptor to get the cost of cd, CostEstimate The estimated cost of the part of the plan outer
to this optimizable. outerCost, Optimizer The optimizer to use to help estimate the cost optimizer, RowOrdering The row ordering for all the tables in the
join order, including this one. rowOrdering)Implements org. Estimate the cost of scanning this Optimizable using the given predicate list with the given conglomerate. |
| public boolean | feasibleJoinStrategy(OptimizablePredicateList
The predicate list that has been pushed down to
this optimizable predList, Optimizer The optimizer to use. optimizer)Implements org. Is the current proposed join strategy for this optimizable feasible given the predicate list? |
| pack-priv void | fillInReferencedTableMap(JBitSet
The table map to fill in. passedMap)Overrides org. Fill the referencedTableMap with this ResultSetNode. |
| pack-priv FromList | Returns: FromList The fromList from the underlying SelectNode.The RCL from the outer query rcl, PredicateList PredicateList to append wherePredicates to. outerPList, SubqueryList The SubqueryList from the outer query sql, GroupByList The group by list, if any gbl, ValueNode The HAVING clause, if any havingClause)Flatten this FromTable into the outer query block. |
| public boolean | forUpdate()
Implements org. Return true if this is the target table of an update |
| public String | getBaseTableName()
Implements org. Get the table name of this Optimizable. |
| public AccessPath | getBestAccessPath()
Implements org. Get the best access path for this Optimizable. |
| public AccessPath | getBestSortAvoidancePath()
Implements org. Get the best sort-avoidance path for this Optimizable. |
| public String | |
| protected CostEstimate | |
| public AccessPath | getCurrentAccessPath()
Implements org. Get the current access path under consideration for this Optimizable |
| pack-priv String | Returns: The exposed name of this table.Get the exposed name for this table, which is the name that can be used to refer to it in the rest of the query. |
| pack-priv CostEstimate | Returns: The final CostEstimate for this FromTable, which is the costEstimate of trulyTheBestAccessPath if there is one. If there's no trulyTheBestAccessPath for this node, then we just return the value stored in costEstimate as a default.Overrides org. Get the final CostEstimate for this FromTable. |
| pack-priv FromTable | Returns: The FromTable, if any, with the exposed name.The specified name to search for as an exposed name. name, String Schema name, if non-null. schemaName, boolean Whether or not we need an exact match on specified schema and table
names or match on table id. exactMatch)Overrides org. Determine whether or not the specified name is an exposed name in the current query block. |
| pack-priv int | Returns: int The query block level for this FromTable.Get the (query block) level (0-based) for this FromTable. |
| pack-priv int | |
| public String | getName()
Implements org. Get the (exposed) name of this Optimizable |
| public int | getNumColumnsReturned()
Implements org. Get the number of the number of columns returned by this Optimizable. |
| pack-priv TableName | Returns: TableName the original or unbound tablenameGets the original or unbound table name for this FromTable. |
| private double | |
| public Properties | getProperties()
Implements org. Get the Properties list, if any, associated with this optimizable. |
| pack-priv ResultColumnList | Returns: ResultColumnList List of result columns from this table.The qualifier on the "*" allTableName, ResultColumnList inputRcl, TableName tableName)Return a ResultColumnList with all of the columns in this table. |
| pack-priv SchemaDescriptor | |
| pack-priv SchemaDescriptor | Returns: Schema Descriptorthe table name tableName)Get a schema descriptor for the given table. |
| protected CostEstimate | |
| public TableDescriptor | getTableDescriptor()
Implements org. Get the table descriptor for this table (if any). |
| pack-priv TableName | Returns: a TableName node representing this FromTable.Return a TableName node representing this FromTable. |
| public int | getTableNumber()
Implements org. Get this Optimizable's table number |
| public AccessPath | getTrulyTheBestAccessPath()
Implements org. Get the best access path overall for this Optimizable. |
| pack-priv String | Returns: The user specified join strategy, if any for this table.Return the user specified join strategy, if any for this table. |
| public int[] | hashKeyColumns()
Implements org. Return the hash key column numbers, for hash join strategy |
| public boolean | Returns: true if at least one large object column is referenced,
false otherwiseImplements org. Check if any columns containing large objects (BLOBs or CLOBs) are referenced in this table. |
| public boolean | hasTableNumber()
Implements org. Return true if this Optimizable has a table number |
| public void | initAccessPaths(Optimizer
The optimizer being used. optimizer)Implements org. Init the access paths for this optimizable. |
| public int | initialCapacity()
Implements org. Return the initial capacity of the hash table, for hash join strategy |
| public boolean | isBaseTable()
Implements org. Tell whether this Optimizable represents a base table |
| public boolean | isCoveringIndex(ConglomerateDescriptor
ConglomerateDesriptor for index to consider cd)Implements org. Return whether or not this is a covering index. |
| pack-priv boolean | Returns: boolean Whether or not this FromTable can be flattened.Is this FromTable a JoinNode which can be flattened into the parents FromList. |
| pack-priv void | |
| public boolean | isMaterializable()
Implements org. Tell whether this Optimizable is materializable |
| public boolean | isOneRowScan()
Implements org. Will the optimizable return at most 1 row per scan? |
| public boolean | isTargetTable()
Implements org. Is the optimizable the target table of an update or delete? |
| public boolean | legalJoinOrder(JBitSet
The tables that have been placed so far in the join order. assignedTableMap)Implements org. Can this Optimizable appear at the current location in the join order. |
| public float | loadFactor()
Implements org. Return the load factor of the hash table, for hash join strategy |
| pack-priv boolean | |
| protected void | markUpdatableByCursor(List<String>
A list representing the columns
that can be updated. updateColumns)Mark as updatable all the columns in the result column list of this FromBaseTable that match the columns in the given update column list. |
| public int | maxCapacity(JoinStrategy joinStrategy, int
The maximum number of bytes to be used. Ignored if the user has set a maximum
number of rows for the Optimizable. maxMemoryPerTable)Implements org. Return the maximum capacity of the hash table, for hash join strategy |
| public boolean | memoryUsageOK(double rowCount, int maxMemoryPerTable)
Implements org.
|
| public Optimizable | modifyAccessPath(JBitSet
Bit map of the tables that are outer to this one
in the join order. outerTables)Implements org. Modify the access path for this Optimizable, as necessary. |
| pack-priv boolean | |
| public boolean | nextAccessPath(Optimizer
Optimizer to use. optimizer, OptimizablePredicateList The predicate list for this optimizable.
The optimizer always passes null, and it is up
to the optimizable object to pass along its
own predicate list, if appropriate, when delegating
this method. predList, RowOrdering The row ordering for all the outer tables in
the join order. This method will add the ordering
of the next access path to the given RowOrdering. rowOrdering)Implements org. Choose the next access path to evaluate for this Optimizable. |
| public CostEstimate | optimizeIt(Optimizer
Optimizer to use. optimizer, OptimizablePredicateList The predicate list to optimize against predList, CostEstimate The CostEstimate for the outer tables in the join order,
telling how many times this Optimizable will be scanned. outerCost, RowOrdering The row ordering for all the tables in the
join order, including this one. rowOrdering)Implements org. Choose the best access path for this Optimizable. |
| pack-priv void | optimizeSubqueries(DataDictionary dd, double rowCount)
Optimize any subqueries that haven't been optimized any where else. |
| public void | pullOptPredicates(OptimizablePredicateList
The list to put the pulled predicates
in. optimizablePredicates)Implements org. Pull all the OptimizablePredicates from this Optimizable and put them in the given OptimizablePredicateList. |
| pack-priv void | pushExpressions(PredicateList
The PredicateList. predicateList)Push expressions down to the first ResultSetNode which can do expression evaluation and has the same referenced table map. |
| public boolean | pushOptPredicate(OptimizablePredicate
OptimizablePredicate to push down. optimizablePredicate)Implements org. Push an OptimizablePredicate down, if this node accepts it. |
| public void | rememberAsBest(int
The type of plan (one of Optimizer.NORMAL_PLAN
or Optimizer.SORT_AVOIDANCE_PLAN) planType, Optimizer The OptimizerImpl that is telling this Optimizable
to remember its current path as "truly the best". optimizer)Implements org. Remember the current access path as the best one (so far). |
| public void | rememberJoinStrategyAsBest(AccessPath ap)
Implements org. Remember the current join strategy as the best one so far in this join order. |
| public void | rememberSortAvoidancePath()
Implements org. Mark this optimizable so that its sort avoidance path will be considered. |
| protected void | resetJoinStrategies(Optimizer optimizer)
This method is called when this table is placed in a potential join order, or when a new conglomerate is being considered. |
| protected void | setCostEstimateCost(CostEstimate newCostEstimate)
Set the cost estimate in this node to the given cost estimate. |
| public void | setHashKeyColumns(int[] columnNumbers)
Implements org. Set the hash key column numbers, for hash join strategy |
| pack-priv void | setLevel(int
The query block level for this FromTable. level)Set the (query block) level (0-based) for this FromTable. |
| pack-priv void | |
| pack-priv void | setOrigTableName(TableName
the unbound table name tableName)Sets the original or unbound table name for this FromTable. |
| public void | setProperties(Properties
The Properties list for this optimizable. tableProperties)Implements org. Set the Properties list for this optimizalbe. |
| pack-priv void | |
| public void | startOptimizing(Optimizer optimizer, RowOrdering rowOrdering)
Implements org. Begin the optimization process for this Optimizable. |
| public boolean | supportsMultipleInstantiations()
Implements org. Tell whether this Optimizable can be instantiated multiple times |
| protected void | tellRowOrderingAboutConstantColumns(RowOrdering rowOrdering, OptimizablePredicateList predList)
Tell the given RowOrdering about any columns that are constant due to their being equality comparisons with constant expressions. |
| public String | Returns: This object as a StringOverrides org. Convert this object to a String. |
| pack-priv FromTable | Returns: The new tree top (OuterJoin or InnerJoin).The predicate tree for the query block predicateTree, int numTables)Transform any Outer Join into an Inner Join where applicable. |
| public double | uniqueJoin(OptimizablePredicateList
The predicate list to check predList)Implements org. Does this optimizable have a uniqueness condition on the given predicate list, and if so, how many unique keys will be returned per scan. |
| public void | updateBestPlanMap(short
Indicates whether we're adding, loading, or removing
a best plan for the OptimizerImpl/Optimizable. action, Object Object to use as the map key when adding/looking up
a plan. If it is an instance of OptimizerImpl then it corresponds
to an outer query; otherwise it's some Optimizable above this
Optimizable that could potentially reject plans chosen by the
OptimizerImpl to which this Optimizable belongs. planKey)Implements org. When remembering "truly the best" access path for an Optimizable, we have to keep track of which OptimizerImpl the "truly the best" access is for. |
| public void | verifyProperties(DataDictionary
The DataDictionary to use. dDictionary)Implements org. Verify that the Properties list with optimizer overrides, if specified, is valid |