12.02.2016, 10:43, Markus Krötzsch wrote:
Restricting queries syntactically to be
"simpler" is what we did in
Semantic MediaWiki (because MySQL did not support time/memory limits per
query). It is a workaround, but it will not prevent long-running queries
unless you make the syntactic restrictions really severe (and thereby
forbid many simple queries, too). I would not do it if there is support
for time/memory limits instead.
Would providing a Linked Data Fragments server [1] help here? It seems
to be designed exactly for situations like this, where you want to
provide a SPARQL query service a large amount of linked data, but are
worried about server performance particularly for complex, long-running
queries. Linked Data Fragments pushes some of the heavy processing to
the client side, which parses and executes the SPARQL queries.
Dynamically updating the data might be an issue here, but some of the
server implementations support running on top of a SPARQL endpoint [2].
I think that from the perspective of the server this means that a heavy,
long-running SPARQL query is broken up already on the client side into
several small, simple SPARQL queries that are relatively easy to serve.
There already is such a service for Wikidata (Cristian Consonni has set
it up a while ago). You could try if the query would work there. I think
that such queries would be rather challenging for a server of this type,
since they require you to iterate almost all of the data client-side.
Note that both "instance of human" and "has a GND identifier" are not
very selective properties. In this sense, the queries may not be
"relatively easy to serve" in this particular case.
Markus