W3C home > Mailing lists > Public > public-sparql-dev@w3.org > April to June 2010

Optimising MINUS by eliminating it where possible?

From: Rob Vesse <rav08r@ecs.soton.ac.uk>
Date: Fri, 11 Jun 2010 12:06:54 +0100
To: <public-sparql-dev@w3.org>
Message-ID: <EMEW3|424aeb2e2adc305c25e29d803495231bm5AC6s06rav08r|ecs.soton.ac.uk|aa92740d461424e2d636bd04ac439807@ecs.soton.ac.uk>


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? 


Rob Vesse  
PhD Student
IAM Group
Bay 20, Room 4027, Building
Electronics & Computer Science
University of Southampton
Received on Friday, 11 June 2010 11:07:28 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:15:50 UTC