&timeout={time in milliseconds}
) as part of Virtuoso's SPARQL Protocol implementation.
---++Sample Scenario
The following scenario demonstrates how to manage anytime SPARQL query execution using the timeout
parameter at a Virtuoso SPARQL Endpoint.
Suppose a simple query:
virtuoso.ini
configuration file. This is basically a table scan, since it has to go through each quad and create a HASH of unique P it sees. After that is done, it will return the first 100 values of P from this hash.
Next we will use SQL translation and explain()
of the query:
RDF_QUAD_POGS
timeout
on the /sparql
form to enable the Anytime paradigm:
1 Go to a Virtuoso SPARQL Endpoint, e.g., the [[http://dbpedia.org/sparql/][DBPpedia SPARQL Endpoint]]:
%BR%%BR%%BR%%BR%
1 Enter the query:
60000
.
%BR%%BR%%BR%%BR%
1 Click "Run Query".
1 You will be redirected to the following URL (containing parameter timeout=60000
), that presents the found results:
10000
(10 sec), you get only one unique ?p
value back. Using a timeout value of 60000
(60 sec) would still only show a few different values for ?p
, which is logical considering that the index is sorted by Predicate (the P slot in the RDF triple pattern). This means that once it gets the first unique ?p
, it has to skip all the triples that have the same value of ?p
, to get to the next one.
---+++Using cURL
---++++cURL Variant without the timeout parameter
p |
---|
http://www.w3.org/1999/02/22-rdf-syntax-ns#type |
http://www.w3.org/2002/07/owl#equivalentClass |
http://www.w3.org/2002/07/owl#sameAs |
http://www.w3.org/2002/07/owl#equivalentProperty |
http://www.w3.org/2000/01/rdf-schema#subClassOf |
http://www.w3.org/2004/02/skos/core#broader |
http://www.w3.org/2000/01/rdf-schema#comment |
http://www.w3.org/2000/01/rdf-schema#label |
http://xmlns.com/foaf/0.1/name |
http://xmlns.com/foaf/0.1/nick |
http://www.w3.org/2004/02/skos/core#prefLabel |
http://www.w3.org/2003/01/geo/wgs84_pos#lat |
http://www.w3.org/2003/01/geo/wgs84_pos#long |
http://www.w3.org/2000/01/rdf-schema#domain |
http://www.w3.org/2000/01/rdf-schema#range |
http://www.w3.org/2002/07/owl#versionInfo |
http://dbpedia.org/ontology/purpose |
http://dbpedia.org/ontology/supplementalDraftRound |
http://dbpedia.org/ontology/podiums |
http://dbpedia.org/ontology/buildingStartDate |
Response
header contains X-SPARQL-MaxRows: 10000
, which is used to indicate the maximum result set size of the instance, configured via [SPARQL]
INI section entry.
For Anytime Query
, it means that determining timeout that triggers response with additional headers (due to partial results) is based on the combination of MaxRows
QueryTimeout
ResultSet
MaxRows
QueryTimeout