Why is Jena tdb2.tdbquery optimization stuck on "Reorder/generic"

73 views Asked by At

I am using apache-jena-4.5.0 and fuseki pretty much out-of-the-box. I had created a TDB2 dataset using fuseki, but now shut it off and using command-line utilities of jena on a Windows box inside a bash shell.

My basic command is:

java -cp "*" tdb2.tdbquery --loc ~/path/to/databases/DEMO--explain --set arq:logExec=FINE --time --query ~/path/to/demoquery.txt

And my question is why does the output always contain only Reorder/generic like this:

15:56:00 INFO exec :: Reorder/generic

Even after I have tried all these:

  • successfully run tdb2.tdbstats and gotten a reasonable-looking temp.opt file as output
  • moved that temp.opt to each of /path/to/DEMO/stats.opt and /path/to/DEMO/Data-001/stats.opt
  • tried uppercase STATS.OPT for each since I'm on windows, just to be sure

Still I don't seem to be able to produce any output with Reorder/stats

1

There are 1 answers

0
Paul Cuddihy On BEST ANSWER

This question did not contain enough detail to answer. The intended question was why won't TDB2 optimize my query and the answer was in the SPARQL, not in the invocation of tdb2.tdbquery or the location of the stats.opt file.

My SPARQL contained multiple FROM clauses, which forced TDB into BGP mode (instead of quads) and thwarted any optimization. As best we can tell at the moment, one wishing to use the TDB2 optimizer should use either the default graph, or a combination of FROM NAMED and GRAPH which causes the evaluation of graphs one at a time.