Optimising MINUS by eliminating it where possible?

Hi 

I was looking at the MINUS syntax which as I understand it will now
be in SPARQL 1.1 and was wondering about how best to optimise it in my
SPARQL implementation. 

As I understand it a MINUS pattern like the
following has no effect since the two BGPs are disjoint and thus no
solutions can possibly be eliminated: 

SELECT * { ?s ?p ?o MINUS { ?x ?y
?z } } 

A naive Algebra transform of this query would I presume be MINUS(
BGP( { ?s ?p ?o } ), BGP( { ?x ?y ?z } ) ) 

But since in any such case the
MINUS can surely be eliminated since it will have no effect so an
alternative algebra transform would just be BGP( { ?s ?p ?o } ) 

Is this
an acceptable and sensible way to optimise MINUS implementation or have I
missed something vital in my interpretation of the MINUS pattern? 

Thanks,


Rob Vesse  
-- 
PhD Student
IAM Group
Bay 20, Room 4027, Building
32
Electronics & Computer Science
University of Southampton
 

Received on Friday, 11 June 2010 11:07:28 UTC