> 4/ You can use a subselect to restrict the remote query part: > > > SERVICE <...> { > SELECT * { > ... > } LIMIT 300 > }
I tried this query: SELECT DISTINCT ?comment WHERE { SERVICE <http://api.talis.com/stores/bbc-backstage/services/sparql> { ?thCenturyClassicalComposers0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://dbpedia.org/class/yago/20thCenturyClassicalComposers> } SERVICE <http://dbpedia.org/sparql> {SELECT ?thCenturyClassicalComposers0 ?comment WHERE { ?thCenturyClassicalComposers0 <http://www.w3.org/2000/01/rdf-schema#comment> ?comment } } } It returns results in a very correct time. Then I remove ?thCenturyClassicalComposers0 from the sub-SELECT: SELECT DISTINCT ?comment WHERE { SERVICE <http://api.talis.com/stores/bbc-backstage/services/sparql> { ?thCenturyClassicalComposers0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://dbpedia.org/class/yago/20thCenturyClassicalComposers> } SERVICE <http://dbpedia.org/sparql> {SELECT ?comment WHERE { ?thCenturyClassicalComposers0 <http://www.w3.org/2000/01/rdf-schema#comment> ?comment } } } This query now takes MUCH MUCH longer. And eventually fizzles in a 509 HttpException. Any idea why the query plan goes so wrong when ?thCenturyClassicalComposers0 is absent of the sub-SELECT. ?