[
https://issues.apache.org/jira/browse/JENA-449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13651857#comment-13651857
]
Andy Seaborne commented on JENA-449:
------------------------------------
Try turning the optimizer off (Optimize.noOptimizer()), or using the
"reference" query engine. (--engine=ref on the command line).
> Federated query optimization for independent queries (with join)
> ----------------------------------------------------------------
>
> Key: JENA-449
> URL: https://issues.apache.org/jira/browse/JENA-449
> Project: Apache Jena
> Issue Type: Question
> Components: ARQ, TDB
> Affects Versions: TDB 0.10.1
> Reporter: Sarven Capadisli
> Priority: Minor
>
> At this point I'm lead to believe that ARQ is not making an optimization
> before making a federated query. Or, well, hopefully the issue has to do with
> my SPARQL knowledge :)
> When trying to make two federated queries (may or may not be to same
> endpoint), the solution of the first graph pattern in SERVICE is projected
> onto the second SERVICE. e.g.,
> SELECT DISTINCT ?a ?c ?x ?y
> WHERE {
> { SERVICE <http://example.org/sparql> {
> ?a :p ?x .
> ?a skos:exactMatch ?b .
> } }
> { SERVICE <http://example.info/sparql> {
> ?c :p ?y .
> ?c skos:exactMatch ?d .
> } }
> FILTER (?b = ?c || ?d = ?a || ?a = ?c)
> }
> As there are no overlapping variable names in use, shouldn't each SERVICE do
> its own thing independently from one another, and then the results get joined?
> What I'm experiencing is that, if the first query comes back with n number of
> triples, the second query is called n times. Expectation is that, each query
> is called once.
> See also:
> http://answers.semanticweb.com/questions/22550/joining-and-filtering-federated-sparql-queries-with-a-single-request-per-service
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira