2

I'm running SPARQL queries like:

prefix ch: <http://pele.farmbio.uu.se/chembl/?>

select count(?s) where {
  ?s a ch:Compound .
}

or any other 'a' query asking all Resources of a certain rdf:type, which is quite slow resulting in a time out... how can I get Virtuoso to be a bit speedier here? Can I index the store so that it more efficiently can return all resources rdf:type some:Foo?

flag

2 Answers

3

There are default indices on triples table (RDF_QUAD), they are only useful if you specify graph in SPARQL query. You can either:

With proper indexing such simple query should execute quickly, or at very least it shouldn't timeout. If you need even more speed, you'll probably need to cache these aggregate counts somewhere.

link|flag
3

Note you can also determine the indexes in place on your Virtuoso RDF_QUAD table using the STATISTICS call

link|flag

Your Answer

Get an OpenID
or

Not the answer you're looking for? Browse other questions tagged or ask your own question.