You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by Andy Seaborne <an...@apache.org> on 2012/06/09 13:55:10 UTC

Re: slower query

(unlinked from unrelated thread)

Thanks for pointing that out.

It's a side effect of fixing two bug with filters, one in groups, one 
was an over aggressive (= wrong) placement - the bugs do not affect the 
results of your example query.

PREFIX jfs: <http://jazz.net/xmlns/foundation/1.0/>
CONSTRUCT { ?s ?p ?o . } WHERE {
   GRAPH ?g {
     ?s ?p ?o .
   }
   ?doc jfs:resourceLocation ?g .
   FILTER ((?g = <documentUriGoesHere>) && (?s != ?doc))
}

now: ==>

(prefix ((jfs: <http://jazz.net/xmlns/foundation/1.0/>))
   (filter (!= ?s ?doc)
     (assign ((?g <documentUriGoesHere>))
       (sequence
         (graph <documentUriGoesHere>
           (bgp (triple ?s ?p ?o)))
         (bgp (triple ?doc jfs:resourceLocation <documentUriGoesHere>))))))


Seems to block the pushing in of the filter to the last BGP.  In this 
case, making very little difference (TDB or memory) because it's at the 
end of a sequence.  If the join engine changes to merge/hash or 
variations thereof, it would make a difference but that's only prototyped.

	Andy