- From: Geoff Chappell <geoff@sover.net>
- Date: Sun, 5 Feb 2006 18:18:16 -0500
- To: "'Garrett Wollman'" <wollman+semantic-web@bimajority.org>, <semantic-web@w3.org>
Yeah, that seems way slow...you must have something funky going on. As an experiment, I grabbed some of your data referenced in an earlier email of yours at: http://lists.w3.org/Archives/Public/semantic-web/2006Jan/0243.html with a simple script (reproduced at end [1]) which yielded about 11k triples. I ran this similar query to the one you posted, I got 144 results in 0.1 seconds: SELECT ?photo, ?name using all WHERE {[rdf:type] ?photo [photo:ImageFile]} and {[photo:concreteRepresentationOf] ?photo ?image} and {[rdf:type] ?image [photo:Image]} and {[foaf:depicts] ?image ?b} and {[rdf:type] ?b [foaf:Person]} and {[foaf:name] ?b ?name} (I used RDF Gateway's native query language rather than our sparql interface, but they'd have similar performance). As much as I'd like to think that our system is just _way_ faster than the others you mentioned :-), I'd guess there's something else going on (even recognizing that I seem to have less than half the data and that it may have changed wildly). So, something doesn't make sense....just doesn't seem like you should be seeing the times you're seeing (btw, even going directly at the data as just an rdf file, rather than in a table, takes only 0.6 seconds). Best, Geoff [1] RDF Gateway script to gather rdf files from site ==================================================== drop table all; create table all as temp; var ds = new datasource("inet?parsetype=html&url=http://gallery.bostonradio.org/"); var rs = (select ?o using #ds where {[inet:_href] ?s ?o}); for (;!rs.EOF; rs.moveNext()) { try { var ds = new datasource("inet?parsetype=rdf&url=http://gallery.bostonradio.org/" + rs[0] + "index.rdf"); insert {?p ?s ?o} into all using #ds where {?p ?s ?o}; } catch(e) { response.write("no rdf index for:" + rs[0]); } } > -----Original Message----- > From: semantic-web-request@w3.org [mailto:semantic-web-request@w3.org] On > Behalf Of Garrett Wollman > Sent: Sunday, February 05, 2006 5:16 PM > To: semantic-web@w3.org > Subject: 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 23:18:48 UTC