Is it just me or does this seem incredibly slow?

In my continuing project to develop a search facility for my photo
galleries using semweb technology, I've been having great difficulty
finding a query mechanism that can answer simple queries about a small
database in a reasonable length of time (i.e., seconds, not
dekaseconds).  I have a small store of some 27,800 triples, containing
depiction information about my photo galleries.  I'm trying to compute
something similar to the following SPARQL query (but with more detail
about each photo):

PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX photo: <http://www.holygoat.co.uk/owl/2005/05/photo/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>

SELECT DISTINCT ?photo, ?name
WHERE
{
        ?photo rdf:type photo:ImageFile ;
           foaf:depicts ?b .
        ?b rdf:type foaf:Person ;
           foaf:name ?name
}

Executing this query on a Redland "hashes" triple store takes at least
five CPU-minutes (that's the point at which I interrupted it) using
rdfproc(1).  Strangely, executing it against pre-serialized RDF takes
only 51 CPU-seconds using roqet(1).  Doing a similar query on a 50%
faster machine using cwm's "--strings" option takes about the same
time.

I see these demo pages on the Web and they don't take that long to
compute a very similar query on much larger databases.  What are they
doing that I'm not?

-GAWollman

Received on Sunday, 5 February 2006 22:16:07 UTC