Il 11/2/2011 1:43 PM, Patrick van Kleef ha scritto:
> Hi Roberto,
>
>> try several times this simple query on http://lod.openlinksw.com/sparql
>> (default dataset name: http://dbpedia.org):
>> #############
>> SELECT COUNT(DISTINCT ?movie) WHERE {
>>   ?movie a dbpedia-owl:Film.
>>   ?movie rdfs:label ?label.
>>   FILTER ( lang(?label) = "en" )
>> }
>> #############
>> You will get each time a different number. :-)
>> Now, if you try the same query on http://dbpedia.org/sparql, you wil get
>> the "correct" number (at least it does not change!): 60222
>>
>> If you remove the filter condition, you will get the same result.
>
> Did you notice that on http://lod.openlinksw.com/sparql page, the 
> field Execution Timeout is set to 15000 ?
>

Great! Thank you very much Patrick! I was sure that someone from 
OpenLink Software would have answered to me. :-)

Just to take advantage of you, is there a way to setting this parameter 
for similar queries programmatically, e.g., via Java code? At the moment 
with Java I use Jena and the sparqlService:
#######################
         Query query = QueryFactory.create("SELECT ...");
         QueryExecution qexec = 
QueryExecutionFactory.sparqlService("http://lod.openlinksw.com/sparql";, 
query, "http://dbpedia.org";);

         try {
             ResultSet results = qexec.execSelect();
             while (results.hasNext()) {
                  ...
            }
         } finally {
             qexec.close();
         }
#######################


> This enables the ANYTIME[1] query option in Virtuoso, which ensures 
> that Virtuoso will return with whatever records it has found in 15000 
> msec, or about 15 seconds of processing time. Depending on other 
> queries running, this amount will be different between successive runs 
> explaining the difference you are seeing.
>
> If you retry your query, but set the field to 0 or empty, then you get 
> similar behaviour to http://dbpedia.org/sparql and will return 60022.
>
> Note that on both machines there are (different) maximum timeouts set, 
> to make sure everyone gets an even share of the resources available on 
> these services.
>
> See also:
> [1] http://docs.openlinksw.com/virtuoso/anytimequeries.html
>
> Patrick
> ---
> OpenLink Software

-- 
roberto mirizzi
http://sisinflab.poliba.it/mirizzi


------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Dbpedia-discussion mailing list
Dbpedia-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion

Reply via email to