Mine as well ... the code has a different opinion.
This is a one of the "no right answer" case for ARQ - there are times
when a more grounded SERVICE call done second is better. I am wondering
if that is actually he less important case though.
Andy
On 21/02/18 12:29, Paul Hermans wrote:
Many thanks, Andy.
Indeed.
Also within 1 second now.
My assumption was that a subquery always is evaluated first with results moving
up to the higher parts?
Paul
On 21 February 2018 at 13:12:06, Andy Seaborne
([email protected]<mailto:[email protected]>) wrote:
Hi Paul,
The difference between the two queries is initial
"?item schema:about ?cbbObject." in the second one.
If you reverse the order of SERVICE and local pattern match, you may get
better execution.
{ ?item schema:about ?cbbObject.
{SELECT ?cbbObject ?cbbnr ?cbbObjectType ?cbbNaam
...
}
}
==>
{
{SELECT ?cbbObject ?cbbnr ?cbbObjectType ?cbbNaam
...
}
?item schema:about ?cbbObject.
}
Please let the list know if this helps,
Andy
On 21/02/18 08:30, Paul Hermans wrote:
Using Fuseki 3.6.0 and also Fuseki 3.4.0 with TDB backend.
Query 1 returns 1 result immediately
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX schema: <http://schema.org/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT ?cbbObject ?cbbnr ?cbbObjectType ?cbbNaam
WHERE {
SERVICE <xxx> {
VALUES ?cbbnr {'00418870043670'}
?cbbObject a ?cbbObjectType;
<http://www.w3.org/2000/01/rdf-schema#label> ?cbbNaam ;
dct:identifier ?cbbnr . }}
Query 2 with the previous as a subselect runs forever.
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX schema: <http://schema.org/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT *
WHERE
{ ?item schema:about ?cbbObject.
{SELECT ?cbbObject ?cbbnr ?cbbObjectType ?cbbNaam
WHERE {
SERVICE <http://lodcbbomv-on-1.vm.cumuli.be:8080/lodomv/repositories/cbb> {
VALUES ?cbbnr {'00418870043670'}
?cbbObject a ?cbbObjectType;
<http://www.w3.org/2000/01/rdf-schema#label> ?cbbNaam ;
dct:identifier ?cbbnr . }}}}
LIMIT 1
The same query in Virtuoso and Stardog returns a result within 1 sec.
What am I missing?
Kind Regards,
Paul Hermans
Kind Regards,
Paul Hermans
-------------------------
ProXML bvba
Linked Data services
KBO: http://data.kbodata.be/organisation/0476_068_080#id
(w) www.proxml.be<http://www.proxml.be/>
(e) [email protected]<mailto:[email protected]>
(tw) @PaulZH
(t) +32 15 23 00 76<tel://+32%2015%2023%2000%2076>
(m) +32 473 66 03 20<tel://+32%20473%2066%2003%2020>
Narcisweg 17
3140 Keerbergen
Belgium
ODEdu – Innovative Open Data Education and Training based on PBL and Learning
Analytics - http://odedu-project.eu/
OpenGovIntelligence – Public Administration Modernization by exploiting Linked Open
Statistical Data -
http://www.opengovintelligence.eu<http://www.opengovintelligence.eu/>
OpenCube – Linked Open Statistical Data - http://opencube-project.eu/