Class QueryJoinOptimizer
- java.lang.Object
-
- org.eclipse.rdf4j.query.algebra.evaluation.optimizer.QueryJoinOptimizer
-
- All Implemented Interfaces:
QueryOptimizer
public class QueryJoinOptimizer extends Object implements QueryOptimizer
A query optimizer that re-orders nested Joins.- Author:
- Arjohn Kampman, James Leigh
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
QueryJoinOptimizer.JoinVisitor
This can be extended by subclasses to allow for adjustments to the optimization process.
-
Field Summary
Fields Modifier and Type Field Description static int
MERGE_JOIN_CARDINALITY_SIZE_DIFF_MULTIPLIER
When deciding if merge join is the correct approach we will compare the cardinality of the two join arguments, if one is bigger than the other by a factor of MERGE_JOIN_CARDINALITY_SIZE_DIFF_MULTIPLIER then we will not use merge join.protected EvaluationStatistics
statistics
static boolean
USE_MERGE_JOIN_FOR_LAST_STATEMENT_PATTERNS_WHEN_CROSS_JOIN
-
Constructor Summary
Constructors Constructor Description QueryJoinOptimizer(EvaluationStatistics statistics)
QueryJoinOptimizer(EvaluationStatistics statistics, boolean trackResultSize)
QueryJoinOptimizer(EvaluationStatistics statistics, boolean trackResultSize, TripleSource tripleSource)
QueryJoinOptimizer(EvaluationStatistics statistics, TripleSource tripleSource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
optimize(TupleExpr tupleExpr, Dataset dataset, BindingSet bindings)
Applies generally applicable optimizations: path expressions are sorted from more to less specific.
-
-
-
Field Detail
-
MERGE_JOIN_CARDINALITY_SIZE_DIFF_MULTIPLIER
@Experimental public static int MERGE_JOIN_CARDINALITY_SIZE_DIFF_MULTIPLIER
When deciding if merge join is the correct approach we will compare the cardinality of the two join arguments, if one is bigger than the other by a factor of MERGE_JOIN_CARDINALITY_SIZE_DIFF_MULTIPLIER then we will not use merge join. As an example, if the limit is 10 and the left cardinality if 50 000 and the right cardinality is 500 000 then we will use merge join, but if it is 500 001 then we will not.
-
USE_MERGE_JOIN_FOR_LAST_STATEMENT_PATTERNS_WHEN_CROSS_JOIN
@Experimental public static boolean USE_MERGE_JOIN_FOR_LAST_STATEMENT_PATTERNS_WHEN_CROSS_JOIN
-
statistics
protected final EvaluationStatistics statistics
-
-
Constructor Detail
-
QueryJoinOptimizer
public QueryJoinOptimizer(EvaluationStatistics statistics)
-
QueryJoinOptimizer
public QueryJoinOptimizer(EvaluationStatistics statistics, TripleSource tripleSource)
-
QueryJoinOptimizer
public QueryJoinOptimizer(EvaluationStatistics statistics, boolean trackResultSize)
-
QueryJoinOptimizer
public QueryJoinOptimizer(EvaluationStatistics statistics, boolean trackResultSize, TripleSource tripleSource)
-
-
Method Detail
-
optimize
public void optimize(TupleExpr tupleExpr, Dataset dataset, BindingSet bindings)
Applies generally applicable optimizations: path expressions are sorted from more to less specific.- Specified by:
optimize
in interfaceQueryOptimizer
- Parameters:
tupleExpr
-
-
-