Package org.openrdf.query.algebra.evaluation.util

Examples of org.openrdf.query.algebra.evaluation.util.QueryOptimizerList


      }

      TripleSource tripleSource = new MemTripleSource(includeInferred, snapshot, readMode);
      EvaluationStrategyImpl strategy = new EvaluationStrategyImpl(tripleSource, query);

      QueryOptimizerList optimizerList = new QueryOptimizerList();
      optimizerList.add(new BindingAssigner());
      optimizerList.add(new ConstantOptimizer(strategy));
      optimizerList.add(new CompareOptimizer());
      optimizerList.add(new ConjunctiveConstraintSplitter());
      optimizerList.add(new DisjunctiveConstraintOptimizer());
      optimizerList.add(new SameTermFilterOptimizer());
      optimizerList.add(new QueryModelPruner());
      optimizerList.add(new QueryJoinOptimizer(new MemEvaluationStatistics()));
      optimizerList.add(new FilterOptimizer());

      optimizerList.optimize(query, bindings);

      logger.trace("Optimized query model:\n{}", query);

      Cursor<BindingSet> iter;
      iter = strategy.evaluate(query, EmptyBindingSet.getInstance());
View Full Code Here


      NativeTripleSource tripleSource = new NativeTripleSource(nativeStore, includeInferred,
          !isAutoCommit());
      EvaluationStrategyImpl strategy = new EvaluationStrategyImpl(tripleSource, query);

      QueryOptimizerList optimizerList = new QueryOptimizerList();
      optimizerList.add(new BindingAssigner());
      optimizerList.add(new ConstantOptimizer(strategy));
      optimizerList.add(new CompareOptimizer());
      optimizerList.add(new ConjunctiveConstraintSplitter());
      optimizerList.add(new DisjunctiveConstraintOptimizer());
      optimizerList.add(new SameTermFilterOptimizer());
      optimizerList.add(new QueryModelPruner());
      optimizerList.add(new QueryJoinOptimizer(new NativeEvaluationStatistics(nativeStore)));
      optimizerList.add(new FilterOptimizer());

      optimizerList.optimize(query, bindings);
      logger.trace("Optimized query model:\n{}", query);

      Cursor<BindingSet> iter;
      iter = strategy.evaluate(query, EmptyBindingSet.getInstance());
      iter = new LockingCursor<BindingSet>(readLock, iter);
View Full Code Here

      }

      TripleSource tripleSource = new MemTripleSource(includeInferred, snapshot, readMode);
      EvaluationStrategyImpl strategy = new EvaluationStrategyImpl(tripleSource, dataset);

      QueryOptimizerList optimizerList = new QueryOptimizerList();
      optimizerList.add(new BindingAssigner());
      optimizerList.add(new ConstantOptimizer(strategy));
      optimizerList.add(new CompareOptimizer());
      optimizerList.add(new ConjunctiveConstraintSplitter());
      optimizerList.add(new SameTermFilterOptimizer());
      optimizerList.add(new QueryModelPruner());
      optimizerList.add(new QueryJoinOptimizer(new MemEvaluationStatistics()));
      optimizerList.add(new FilterOptimizer());

      optimizerList.optimize(tupleExpr, dataset, bindings);

      CloseableIteration<BindingSet, QueryEvaluationException> iter;
      iter = strategy.evaluate(tupleExpr, bindings);
      return new LockingIteration<BindingSet, QueryEvaluationException>(stLock, iter);
    }
View Full Code Here

      replaceValues(tupleExpr);

      TripleSource tripleSource = new NativeTripleSource(nativeStore, includeInferred, transactionActive());
      EvaluationStrategyImpl strategy = new EvaluationStrategyImpl(tripleSource, dataset);

      QueryOptimizerList optimizerList = new QueryOptimizerList();
      optimizerList.add(new BindingAssigner());
      optimizerList.add(new ConstantOptimizer(strategy));
      optimizerList.add(new CompareOptimizer());
      optimizerList.add(new ConjunctiveConstraintSplitter());
      optimizerList.add(new SameTermFilterOptimizer());
      optimizerList.add(new QueryModelPruner());
      optimizerList.add(new QueryJoinOptimizer());
      optimizerList.add(new FilterOptimizer());

      optimizerList.optimize(tupleExpr, dataset, bindings);

      CloseableIteration<BindingSet, QueryEvaluationException> iter;
      iter = strategy.evaluate(tupleExpr, bindings);
      return new LockingIteration<BindingSet, QueryEvaluationException>(readLock, iter);
    }
View Full Code Here

      // Add a dummy root node to the tuple expressions to allow the
      // optimisers to modify the actual root node
      tupleExpr = new QueryRoot(tupleExpr);
    }

    QueryOptimizerList optimizerList = new QueryOptimizerList();
    addCoreOptimizations(strategy, optimizerList);
    addRdbmsOptimizations(optimizerList);
    optimizerList.add(new SqlConstantOptimizer());

    optimizerList.optimize(tupleExpr, dataset, bindings);
    return tupleExpr;
  }
View Full Code Here

TOP

Related Classes of org.openrdf.query.algebra.evaluation.util.QueryOptimizerList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.