On 29/12/10 12:49, Benson Margulies wrote:
On Wed, Dec 29, 2010 at 5:59 AM, Andy Seaborne
<[email protected]>  wrote:
BIND is cheap.

But

          ?rel rdfs:subPropertyOf rex:relationship .
          { BIND(?rel AS ?s) }
            ?s ?p ?o

puts it inside a {} and so the optimizer drops back to a slow-not-correct
algorithm which in involves calcuating unbounded "?s ?p ?o" AKA the whole
database.


So, OK, howcome your original BIND example uses braces instead of just
including it with the first where pattern?

because it's used in a UNION:

{ BIND(?entity AS ?s} }
   UNION
{ ?s owl:sameAs ?entity }
  UNION
{ ?entity owl:sameAs ?s }

I'm really sorry to be exhibiting such signs of cargo-cultism.

        Andy

Reply via email to