Class QueryJoinOptimizer
java.lang.Object
org.eclipse.rdf4j.query.algebra.evaluation.optimizer.QueryJoinOptimizer
- All Implemented Interfaces:
QueryOptimizer
A query optimizer that re-orders nested Joins.
- Author:
- Arjohn Kampman, James Leigh
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected class
This can be extended by subclasses to allow for adjustments to the optimization process. -
Field Summary
Modifier and TypeFieldDescriptionstatic int
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 final EvaluationStatistics
static boolean
-
Constructor Summary
ConstructorDescriptionQueryJoinOptimizer
(EvaluationStatistics statistics) QueryJoinOptimizer
(EvaluationStatistics statistics, boolean trackResultSize) QueryJoinOptimizer
(EvaluationStatistics statistics, boolean trackResultSize, TripleSource tripleSource) QueryJoinOptimizer
(EvaluationStatistics statistics, TripleSource tripleSource) -
Method Summary
Modifier and TypeMethodDescriptionvoid
optimize
(TupleExpr tupleExpr, Dataset dataset, BindingSet bindings) Applies generally applicable optimizations: path expressions are sorted from more to less specific.
-
Field Details
-
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
-
statistics
-
-
Constructor Details
-
QueryJoinOptimizer
-
QueryJoinOptimizer
-
QueryJoinOptimizer
-
QueryJoinOptimizer
public QueryJoinOptimizer(EvaluationStatistics statistics, boolean trackResultSize, TripleSource tripleSource)
-
-
Method Details
-
optimize
Applies generally applicable optimizations: path expressions are sorted from more to less specific.- Specified by:
optimize
in interfaceQueryOptimizer
- Parameters:
tupleExpr
-
-