Question

I used D2R server to Rdfize my database which hold 1.3 million record approximately. Everything went fine in transformation but the speed of SPARQL end point is very slow and most of time it ends up with 500 unknown error. I am looking for any solution which can speed up query execution process. I have an example, check with dbpedia snorql, when i query it gives me results in seconds. But when i try to run same kind of query in my endpoint, it yields results very late and most of the time no error (Java heap type or 500 unknown). DBpedia snorql http://dbpedia.org/snorql. try this query

SELECT count(*) WHERE { ?s ?p ?o }

My snorql http://cbakerlab.unbsj.ca:8080/liapibackup/snorql/

Any advice/suggestion will highly be appreciated. P.s i have around 42 GB RAM in my server, so memory should not be an issue. Thanks

Was it helpful?

Solution

The reason for this is that you are using D2R. If you execute a query that matches every possible triple, this means that all mappings have to be resolved. This results in a lot of SQL (or whatever relation database you are using) queries.

There are two possible solutions:

Only do specific queries and use limits:

SELECT ?s ?p ?o WHERE {
  ?s ?p ?o
} LIMIT 10

SELECT ?s WHERE {
  ?s a uysie:DocumentFigures
} LIMIT 100

Or use the d2r rdf-dump tool and put the result in a rdf store

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top