org.axiondb.engine.commands
public class AxionQueryOptimizer extends Object
Method Summary | |
---|---|
static Selectable | createOneRootFunction(Set conditions)
Compose back the decomposed condition into a single condition tree.
|
static Set[] | decomposeWhereConditionNodes(Set flattenConditionSet, boolean isAllInnerJoin)
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.
|
static Set | deriveTableFilter(Set flattenConditions, boolean isAllInnerJoin)
Decomposes the given WhereNodeinto a Setof 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.)
|
static Function | findColumnLiteralEqualFunction(TableIdentifier tid, Table table, Set conditions, boolean mustCheckForIndex) |
static Function | findColumnLiteralFunction(TableIdentifier tid, Table table, Set conditions, boolean mustCheckForIndex)
Find column-literal comparision function for a given table. |
static ComparisonFunction | findFirstColumnColumnComparisonFunction(Set columnColumnConditions, TableIdentifier tid, Table table, boolean mustCheckForIndex) |
static EqualFunction | findFirstEqualFunction(Set columnColumnConditions, TableIdentifier tid, Table table, boolean mustCheckForIndex) |
static Set | flatConditionTree(Selectable conditionTree)
Flatten the given condition tree into an ANDed set
|
static Selectable | getColumnRefersTable(ComparisonFunction fn, TableIdentifier tid) |
static boolean | hasTableReference(ComparisonFunction fn, TableIdentifier tid) |
static boolean | isAllInnerJoin(Object node) |
static Function | isColumnIndexed(TableIdentifier tid, Table table, Selectable condition, boolean mustCheckForIndex) |
static boolean | onlyReferencesTable(TableIdentifier table, Selectable conditionNode)
Check if the given table is the only table refernce in the condition
|
Parameters: conditions decomposed condition set
Returns: Single condition tree composed with AndFunction
Parameters: flattenConditionSet Flatten Condition Set, created from the where/join condition, or combined where and join condition set
Returns: Array of Set 0: column-column set, 1: column-literal set, 2: other
Parameters: flattenConditions
Returns: derived condition set
Throws: AxionException
Parameters: tid TableIdentifier conditions decomposed condition set
Returns: column-literal function if found, null if not found
Parameters: conditionTree condition tree
Returns: flat set of functions which are anded together
Parameters: table TableIdentifier conditionNode
Returns: true if match, otherwise false.