HI Lorenz/Claus,
Ah, I see what you mean and have reported to development to look into, as it
does appear a bad plan is being selected when the graph name is specified in
the query ...
SQL> sparql Select ?x { ?x <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#Class> . ?x
<http://www.w3.org/2000/01/rdf-schema#label> ?v_3 .
Filter(<bif:contains>(?v_3, "airport")) . Filter(langMatches(lang(?v_3),
"en")) . } Limit 10;
x
VARCHAR
_______________________________________________________________________________
http://dbpedia.org/ontology/Airport
http://dbpedia.org/ontology/Airport
NULL
http://www.productontology.org/id/Airport
NULL
http://dbpedia.org/ontology/Airport
http://www.openlinksw.com/schemas/rdfs/Airport#this
NULL
http://dbpedia.org/ontology/Airport
http://dbpedia.org/ontology/Airport
10 Rows. -- 815 msec.
SQL>
SQL>
SQL>
SQL>
SQL>
SQL>
SQL> sparql Select ?x from <http://dbpedia.org> { ?x
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#Class> . ?x
<http://www.w3.org/2000/01/rdf-schema#label> ?v_3 .
Filter(<bif:contains>(?v_3, "airport"))
x
VARCHAR
_______________________________________________________________________________
http://dbpedia.org/ontology/Airport
1 Rows. -- 67274 msec.
SQL>
query with graph name is timing out resulting in partial result set being
returned by "anytime" feature ...
Best Regards
Hugh Williams
Professional Services
OpenLink Software, Inc. // http://www.openlinksw.com/
Weblog -- http://www.openlinksw.com/blogs/
LinkedIn -- http://www.linkedin.com/company/openlink-software/
Twitter -- http://twitter.com/OpenLink
Google+ -- http://plus.google.com/100570109519069333827/
Facebook -- http://www.facebook.com/OpenLinkSoftware
Universal Data Access, Integration, and Management Technology Providers
On 19 Aug 2014, at 16:24, Lorenz Bühmann <buehm...@informatik.uni-leipzig.de>
wrote:
> Hello Hugh,
>
> if you set the default graph to http://dbpedia.org at
> http://lod.openlinksw.com/sparql the same behaviour that Claus spotted at
> DBpedia occurs, which is also strange because it needs much more time on a
> smaller graph compared to the whole LOd Cloud.
>
> Kind regards,
> Lorenz
>
>> Hi Claus,
>>
>> I see the behaviour you report running the two queries again
>> http://dbpedia.org/sparql , but running against
>> http://lod.openlinksw.com/sparql the roles are reversed with the
>> bif:contains query completing in about 1 sec :
>>
>> http://lod.openlinksw.com/sparql/?default-graph-uri=&qtxt=Select+%3Fx+%7B%0D%0A++%3Fx+%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23type%3E+%3Chttp%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl%23Class%3E+.%0D%0A++%3Fx+%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23label%3E+%3Fv_3+.%0D%0A++Filter%28%3Cbif%3Acontains%3E%28%3Fv_3%2C+%22airport%22%29%29+.%0D%0A++Filter%28langMatches%28lang%28%3Fv_3%29
>> %2C+%22en
>> %22%29%29+.%0D%0A%7D++Limit+10&format=text%2Fhtml&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=30000&debug=on
>>
>> and the regex query taking 20+ secs to complete:
>>
>> http://lod.openlinksw.com/sparql/?default-graph-uri=&qtxt=Select+%3Fx+%7B%0D%0A++%3Fx+%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23type%3E+%3Chttp%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl%23Class%3E+.%0D%0A++%3Fx+%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23label%3E+%3Fv_3+.%0D%0A++Filter%28regex%28%3Fv_3%2C+%22airport%22%2C+%22i%22%29%29+.%0D%0A++Filter%28langMatches%28lang%28%3Fv_3%29%2C+%22e
>> n%22%29%2
>> 9+.%0D%0A%7D++Limit+10&format=text%2Fhtml&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=30000&debug=on
>>
>> So something to look into against the dbpedia endpoint , but not against lod
>> ...
>>
>> Best Regards
>> Hugh Williams
>> Professional Services
>> OpenLink Software, Inc. // http://www.openlinksw.com/
>> Weblog -- http://www.openlinksw.com/blogs/
>> LinkedIn -- http://www.linkedin.com/company/openlink-software/
>> Twitter -- http://twitter.com/OpenLink
>> Google+ -- http://plus.google.com/100570109519069333827/
>> Facebook -- http://www.facebook.com/OpenLinkSoftware
>> Universal Data Access, Integration, and Management Technology Providers
>>
>> On 19 Aug 2014, at 12:20, Claus Stadler <cstad...@informatik.uni-leipzig.de>
>> wrote:
>>
>>> Hi,
>>>
>>> I noticed the following issue on the DBpedia endpoint and the LOD cache
>>> (http://dbpedia.org/sparql, http://lod.openlinksw.com/sparql):
>>> I did not have time to try it against a develop7 git branch.
>>>
>>> The following query works as expected and returns fast: It apparently scans
>>> the approx. 600 classes and filters them by their label matching the regex:
>>>
>>> Select ?x {
>>> ?x <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
>>> <http://www.w3.org/2002/07/owl#Class> .
>>> ?x <http://www.w3.org/2000/01/rdf-schema#label> ?v_3 .
>>> Filter(regex(?v_3, "airport", "i")) .
>>> Filter(langMatches(lang(?v_3), "en")) .
>>> } Limit 10
>>>
>>>
>>>
>>> The following query takes very long to complete. Apparently the query
>>> planner decides to start with bif:contains, thereby scanning all instances
>>> that have 'airport' in their name - which is a much larger set than
>>> filtering just by the classes first:
>>>
>>> Select ?x {
>>> ?x <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
>>> <http://www.w3.org/2002/07/owl#Class> .
>>> ?x <http://www.w3.org/2000/01/rdf-schema#label> ?v_3 .
>>> Filter(<bif:contains>(?v_3, "airport")) .
>>> Filter(langMatches(lang(?v_3), "en")) .
>>> } Limit 10
>>>
>>> I am wordering if there are already planned enhancements for this issue.
>>>
>>>
>>> Cheers,
>>> Claus
>>>
>>> --
>>> Dipl. Inf. Claus Stadler
>>> Department of Computer Science, University of Leipzig
>>> Research Group: http://aksw.org/
>>> Workpage & WebID: http://aksw.org/ClausStadler
>>> Phone: +49 341 97-32260
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> _______________________________________________
>>> Virtuoso-users mailing list
>>> Virtuoso-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
>>
>>
>>
>> ------------------------------------------------------------------------------
>>
>>
>> _______________________________________________
>> Virtuoso-users mailing list
>> Virtuoso-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
> --
> Lorenz Bühmann, MSc in Computer Science
> AKSW group, University of Leipzig
> Group: http://aksw.org - semantic web research center
> ------------------------------------------------------------------------------
> _______________________________________________
> Virtuoso-users mailing list
> Virtuoso-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users