You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Benson Margulies <bi...@gmail.com> on 2010/12/29 03:56:26 UTC

Going over a performance cliff with tdb with complex query.

If I comment in the additional UNION clauses down at the bottom,
tdbquery seems prepared to run forever. Or, at least, longer than I'm
prepared to wait. Are these a generally bad idea? Should I just run
another query for the second expansion?


WHERE
{
       GRAPH x-arq:UnionGraph {

       # Items of interest.
          ?entity rex:hasNormalizedText "Obama" .
       #sets ?s by direct reference.
          { BIND(?entity AS ?s) }
          UNION
       # sets ?s by forward owl:sameAs
          { ?s owl:sameAs ?entity }
          UNION
       #  sets ?s by backward owl:sameAs
          { ?entity owl:sameAs ?s }
	  UNION
       # sets ?entity by relationship
        { ?entity ?pred ?s .
           ?pred rdfs:subPropertyOf rex:relationship . }
#          UNION
#       # sets ?entity by relationship
#        { ?entity ?pred ?t .
#          ?t owl:sameAs ?s .
#           ?pred rdfs:subPropertyOf rex:relationship . }
#         UNION
#       # sets ?entity by relationship
#        { ?entity owl:sameAs ?t .
#          ?t ?pred ?s .
#           ?pred rdfs:subPropertyOf rex:relationship . }
       # All triples of the subject
          ?s ?p ?o .
	  }
}