public class StatementGroupAndJoinOptimizer extends AbstractQueryModelVisitor<OptimizationException> implements FedXOptimizer
ExclusiveStatement
into ExclusiveGroup
2. Adjust the join order using
DefaultFedXCostModel
Constructor and Description |
---|
StatementGroupAndJoinOptimizer(QueryInfo queryInfo,
FedXCostModel costModel) |
Modifier and Type | Method and Description |
---|---|
protected double |
estimateCost(TupleExpr tupleExpr,
Set<String> joinVars) |
protected List<TupleExpr> |
formGroups(List<TupleExpr> originalArgs)
Group
ExclusiveStatement s having the same source into an ExclusiveGroup . |
void |
meet(Service tupleExpr) |
protected void |
meetNJoin(NJoin node) |
void |
meetOther(QueryModelNode node) |
void |
optimize(TupleExpr tupleExpr)
Optimize the provided tuple expression
|
protected List<TupleExpr> |
optimizeJoinOrder(List<TupleExpr> joinArgs)
Join Order Optimizer
Group -> Statements according to number of free Variables
Additional Heuristics: - ExclusiveGroups are cheaper than any other subquery - owned statements are cheaper if
they have a single free variable
|
meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meetBinaryTupleOperator, meetBinaryValueOperator, meetCompareSubQueryValueOperator, meetNAryValueOperator, meetNode, meetSubQueryValueOperator, meetUnaryTupleOperator, meetUnaryValueOperator, meetUpdateExpr
protected final QueryInfo queryInfo
public StatementGroupAndJoinOptimizer(QueryInfo queryInfo, FedXCostModel costModel)
public void optimize(TupleExpr tupleExpr)
FedXOptimizer
optimize
in interface FedXOptimizer
public void meet(Service tupleExpr)
meet
in interface QueryModelVisitor<OptimizationException>
meet
in class AbstractQueryModelVisitor<OptimizationException>
public void meetOther(QueryModelNode node)
meetOther
in interface QueryModelVisitor<OptimizationException>
meetOther
in class AbstractQueryModelVisitor<OptimizationException>
protected void meetNJoin(NJoin node)
protected List<TupleExpr> formGroups(List<TupleExpr> originalArgs)
ExclusiveStatement
s having the same source into an ExclusiveGroup
.originalArgs
- protected List<TupleExpr> optimizeJoinOrder(List<TupleExpr> joinArgs)
joinArgs
- Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.