On 26/05/13 13:05, Sarven Capadisli wrote:
On 05/26/2013 01:38 PM, Andy Seaborne wrote:
On 25/05/13 19:45, Sarven Capadisli wrote:
Hi,
What does Optimize.noOptimizer() [1] entail?
It installs, as the global optimizer, one that is extremely fast and
efficient ... at doing nothing.
It returns the algebra expression unchanged.
I'm not sure I completely understand the consequences. Does it
essentially impact rules and inferencing?
No - this is below that.
In Jena, inference is a layered graph and the inference (backwards)
rules make accesses into the database. (This can lead to excessive fine
grained access at scale.) Inference is at the unit of the triple so it
has broken up basic graph patterns (BGPs) of SPARQL execution and makes
single triple pattern access to the data.
Does it impact or deactivate TDB Optimizer [2]?
TDB calls the main optmizer - if it's been set to the null optimizer no
change to the algebra is done (BGP reordering is handled separately).
So, they don't influence one another? What if the TDB optimizer uses
weighing rules (stats.opt)?
The high-level optimizer rewrites algebra expressions into better
algebra expressions. Solving a BGP is a primitive access point to the
data (not the triple pattern). The op rewrite happens, then the system
starts to execute, then BGPs by TDB are rewritten on-the-fly during
execution.
Backward inference may lead to the unit passed to TDB to be single
triple patterns.
Forward inference can be stored in the DB and then run with no runtime
inference layer.
Andy
Andy
[1]
http://jena.apache.org/documentation/javadoc/arq/com/hp/hpl/jena/sparql/algebra/optimize/Optimize.html#noOptimizer()
[2] http://jena.apache.org/documentation/tdb/optimizer.html
-Sarven
http://csarven.ca/#i