| Answer an ExtendedIterator returning all the triples from this store that
match the pattern m = (S, P, O) .
Because the node-to-triples maps index on each of subject, predicate,
and (non-literal) object, concrete S/P/O patterns can immediately select
an appropriate map. Because the match for literals must be by sameValueAs,
not equality, the optimisation is not applied for literals. [This is probably a
Bad Thing for strings.]
Practice suggests doing the predicate test last, because there are
"usually" many more statements than predicates, so the predicate doesn't
cut down the search space very much. By "practice suggests" I mean that
when the order went, accidentally, from S/O/P to S/P/O, performance on
(ANY, P, O) searches on largish models with few predicates declined
dramatically - specifically on the not-galen.owl ontology.
|