| java.lang.Object org.axiondb.engine.commands.AxionQueryOptimizer
AxionQueryOptimizer | public class AxionQueryOptimizer (Code) | | Axion Query Optimizer
author: Rodney Waldhoff author: Chuck Burdick author: Ahimanikya Satapathy author: Ritesh Adval |
Method Summary | |
public static Selectable | createOneRootFunction(Set conditions) Compose back the decomposed condition into a single condition tree. | public static Set[] | decomposeWhereConditionNodes(Set flattenConditionSet, boolean isAllInnerJoin) Decomose a where/join condition into three part: (1) column-column comparision
function (2) column-literal conditions. | public static Set | deriveTableFilter(Set flattenConditions, boolean isAllInnerJoin) | public static Function | findColumnLiteralEqualFunction(TableIdentifier tid, Table table, Set conditions, boolean mustCheckForIndex) | public static Function | findColumnLiteralFunction(TableIdentifier tid, Table table, Set conditions, boolean mustCheckForIndex) Find column-literal comparision function for a given table. | public static ComparisonFunction | findFirstColumnColumnComparisonFunction(Set columnColumnConditions, TableIdentifier tid, Table table, boolean mustCheckForIndex) | public static EqualFunction | findFirstEqualFunction(Set columnColumnConditions, TableIdentifier tid, Table table, boolean mustCheckForIndex) | public static Set | flatConditionTree(Selectable conditionTree) | public static Selectable | getColumnRefersTable(ComparisonFunction fn, TableIdentifier tid) | public static boolean | hasTableReference(ComparisonFunction fn, TableIdentifier tid) | public static boolean | isAllInnerJoin(Object node) | public static Function | isColumnIndexed(TableIdentifier tid, Table table, Selectable condition, boolean mustCheckForIndex) | public static boolean | onlyReferencesTable(TableIdentifier table, Selectable conditionNode) |
createOneRootFunction | public static Selectable createOneRootFunction(Set conditions)(Code) | | Compose back the decomposed condition into a single condition tree.
Parameters: conditions - decomposed condition set Single condition tree composed with AndFunction |
decomposeWhereConditionNodes | public static Set[] decomposeWhereConditionNodes(Set flattenConditionSet, boolean isAllInnerJoin)(Code) | | Decomose a where/join condition into three part: (1) column-column comparision
function (2) column-literal conditions. column-literal conditions can be applied
earlier at table level than at join level. (3) and all remaining conditions: any
other function, these will be applied after join.
Parameters: flattenConditionSet - Flatten Condition Set, created from the where/joincondition, or combined where and join condition set Array of Set 0: column-column set, 1: column-literal set, 2: other |
deriveTableFilter | public static Set deriveTableFilter(Set flattenConditions, boolean isAllInnerJoin) throws AxionException(Code) | | Decomposes the given
WhereNode into a
Set of nodes that were
originally joined by ANDs, and adds to this set predicates that are implied by the
original tree (for example, given A = 1 and A = B, we can
infer B = 1.)
Parameters: flattenConditions - derived condition set throws: AxionException - |
findColumnLiteralFunction | public static Function findColumnLiteralFunction(TableIdentifier tid, Table table, Set conditions, boolean mustCheckForIndex)(Code) | | Find column-literal comparision function for a given table. This function then can
be applied first to restrict the number of rows returned by an iterator. We do this
at the index level also. Give preference to EqualFunction
Parameters: tid - TableIdentifier Parameters: conditions - decomposed condition set column-literal function if found, null if not found |
flatConditionTree | public static Set flatConditionTree(Selectable conditionTree)(Code) | | Flatten the given condition tree into an ANDed set
Parameters: conditionTree - condition tree flat set of functions which are anded together |
isAllInnerJoin | public static boolean isAllInnerJoin(Object node)(Code) | | |
onlyReferencesTable | public static boolean onlyReferencesTable(TableIdentifier table, Selectable conditionNode)(Code) | | Check if the given table is the only table refernce in the condition
Parameters: table - TableIdentifier Parameters: conditionNode - true if match, otherwise false. |
|
|