0

So I know Jena Arq supports stage reordering as an optimization. (See https://github.com/apache/jena/blob/master/jena-arq/src/main/java/org/apache/jena/sparql/engine/main/StageGeneratorGeneric.java)

On line #70, there is a check for if the input is QueryIterRoot -- My issue is every query I submit, the input is QueryIterRoot so it never runs the optimization within that block.

Tracing back the stack, I can't see how to generate a query where QueryIterRoot isn't the input passed to StageGeneratorGeneric. Am I missing something to get stage optimization working?

Mark
  • 4,446
  • 5
  • 26
  • 34

1 Answers1

0

QueryIterRoot is always one row of no variables so there is no substitution to do and so there is no invalidation of static reordering. It is assumed that the query was optimized by the static optimization step or is left under the user's control.

For a simple pattern query WHERE { ... basic graph pattern ... } the input will be QueryIterRoot

AndyS
  • 16,345
  • 17
  • 21
  • So what type of query gets optimized? Queries with nested basic graph patterns? What is the `static optimization` step you referred to? – Mark Feb 19 '16 at 22:33