[Mulgara-dev] More TQL questions - performance issues with MINUS

Dragisa Krsmanovic dkrsmanovic at plos.org
Tue Jul 28 17:21:36 UTC 2009


On Tue, 2009-07-28 at 10:12 -0700, Dragisa Krsmanovic wrote:
> On Tue, 2009-07-28 at 12:02 -0500, Paul Gearon wrote:
> > So change the query to this:
> > 
> > select $id $accstate $email
> > from <local:///topazproject#profiles>
> > where $id <rdf:type> <http://xmlns.com/foaf/0.1/OnlineAccount> in
> > <local:///topazproject#users>
> >   and $p <http://xmlns.com/foaf/0.1/holdsAccount> $id
> >   and $p <http://xmlns.com/foaf/0.1/mbox> $email
> >   and $id <topaz:accountState> $accstate in <local:///topazproject#users>
> >   minus (
> >     $p <topaz:displayName> $username
> >     and $p <http://xmlns.com/foaf/0.1/givenname> $firstname
> >     and $p <http://xmlns.com/foaf/0.1/surname> $lastname
> >   );
> > 
> 
> Hm. This query gives me org.mulgara.query.TuplesException: Unable to
> subtract: no common variables. Tried putting $p in column list too.

And if I add $email line in the minus section, query runs "forever".

select $id $accstate $email 
from <local:///topazproject#profiles>
where $id <rdf:type> <http://xmlns.com/foaf/0.1/OnlineAccount> in
<local:///topazproject#users>
  and $id <topaz:accountState> $accstate in
<local:///topazproject#users>
  and $p <http://xmlns.com/foaf/0.1/holdsAccount> $id
  and $p <http://xmlns.com/foaf/0.1/mbox> $email
  minus (
    $p <topaz:displayName> $username
    and $p <http://xmlns.com/foaf/0.1/mbox> $email
    and $p <http://xmlns.com/foaf/0.1/givenname> $firstname
    and $p <http://xmlns.com/foaf/0.1/surname> $lastname
  );


Cheers,
Dragisa



More information about the Mulgara-dev mailing list