new ConstantOptimizer(strategy).optimize(query, bindings);
new CompareOptimizer().optimize(query, bindings);
new ConjunctiveConstraintSplitter().optimize(query, bindings);
new DisjunctiveConstraintOptimizer().optimize(query, bindings);
new SameTermFilterOptimizer().optimize(query, bindings);
new QueryModelPruner().optimize(query, bindings);
FederationStatistics statistics = new FederationStatistics(federation.getExecutor(), members, query);
// new QueryJoinOptimizer(statistics).optimize(query, bindings);
// new FilterOptimizer().optimize(query, bindings);
new EmptyPatternOptimizer(members).optimize(query, bindings);
boolean distinct = federation.isDistinct();
PrefixHashSet local = federation.getLocalPropertySpace();
new FederationJoinOptimizer(members, distinct, local).optimize(query, bindings);
new OwnedTupleExprPruner().optimize(query, bindings);
new QueryModelPruner().optimize(query, bindings);
new QueryJoinOptimizer(statistics).optimize(query, bindings);
new FederationFilterOptimizer().optimize(query, bindings);
statistics.await(); // let statistics throw any exceptions it has
new PrepareOwnedTupleExpr(federation.getMetaData()).optimize(query, bindings);