Hi, The following SPARQL Query returns approx. 10000 results out of 35 million triples.
select [distinct] ?conflict ?metadata [from <http://example.com/mygraph>] where { ?conflict a <http://dbpedia.org/ontology/MilitaryConflict> . ?conflict ?p <http://dbpedia.org/ontology/Event> . ?p rdfs:subPropertyOf rdf:type . ?p <http://example.com/mymetadata> ?metadata . } There are only 4 graphs including the Virtuoso default graphs and all triples concerned are in <http://example.com/mygraph>. RDF_QUAD has the following default indexes: GS, OP, POGS, SP. Now the given query seems to be really slow. With FROM clause it is even slower than without. Using DISTINCT or not does not seem to have much impact. Which indexes could help? I would think the query triple "?conflict ?p <Event>" could be the cause for the delay - shouldn't an index on just "O", "O,S", or "G,O,S" help? I tried each of the three without much of an effect. Are there other tables which need to be indexed in order to increase SPARQL perfomance? (Background: We have subclassed rdf:type dynamically for each ?s a <Event> triple in order to annotate metadata, e.g. provenance, source, time, ...) Any ideas? Thanks and cheers, Martin -- ------------------------------------------------------------------------ Martin Gerlach Research Neofonie Technologieentwicklung und Informationsmanagement GmbH Robert-Koch-Platz 4 10115 Berlin fon: +49.30 24627 413 fax: +49.30 24627 120 martin.gerl...@neofonie.de <mailto:martin.gerl...@neofonie.de> http://www.neofonie.de Handelsregister Berlin-Charlottenburg: HRB 67460 Geschaeftsfuehrung Helmut Hoffer von Ankershoffen (Sprecher der Geschaeftsfuehrung) Nurhan Yildirim ------------------------------------------------------------------------ Das WePad ist ein Tablet der neuesten Generation. Dem Nutzer bietet es schnellen Zugang zum Internet, eine komplette Welt von sofort nutzbaren Applikationen und einfachen Zugriff auf Bücher, Fotos sowie auf Magazine und Tageszeitungen verschiedener Verlage, die mit dem WeMagazine ePublishing Eco System realisiert wurden. Mehr über das WePad auf www.wepad.mobi <http://www.wepad.mobi> oder auf www.facebook.com/WePad <http://www.facebook.com/WePad>.