You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by Andy Seaborne <an...@apache.org> on 2013/11/21 15:33:32 UTC

Improved filter placement optimization

A quick ping about JENA-595

This will improve the filter placement optimization, most significantly 
when possible with OPTIONAL.

I'm going to apply it to the codebase and, in theory, it performs all 
the optimizations the old code used (the tests all pass or an equivalent 
test put in due to slightly different ways to do the same thing). If 
anything funny starts happening, I'm sure you'll let JIRA know.

	Andy


On 19/11/13 21:39, Andy Seaborne (JIRA) wrote:
>
>      [ https://issues.apache.org/jira/browse/JENA-595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13826970#comment-13826970 ]
>
> Andy Seaborne commented on JENA-595:
> ------------------------------------
>
> The JENA-383 query:
>
> {noformat}
> PREFIX ex: <http://example/>
> SELECT * WHERE {
>      ?var ex:p1 ?x.
>      OPTIONAL { ?x ex:p2 ?y. }
>      FILTER (?var != ex:i)
> }
> {noformat}
>
> Up to Jena 2.11.0:
> {noformat}
> (prefix ((ex: <http://example/>))
>    (filter (= ?var ex:i)
>      (conditional
>        (bgp (triple ?var ex:p1 ?x))
>        (conditional
>          (bgp (triple ?x ex:p2 ?y))
>          (bgp (triple ?y ex:p3 ?z))))))
> {noformat}
> and with patch:
> {noformat}
> (prefix ((ex: <http://example/>))
>    (conditional
>      (filter (= ?var ex:i)
>        (bgp (triple ?var ex:p1 ?x)))
>      (conditional
>        (bgp (triple ?x ex:p2 ?y))
>        (bgp (triple ?y ex:p3 ?z)))))
> {noformat}
> The filter is done on the LHS of the outer OPTIONAL.
>
>> Improve filter placement optimization
>> -------------------------------------
>>
>>                  Key: JENA-595
>>                  URL: https://issues.apache.org/jira/browse/JENA-595
>>              Project: Apache Jena
>>           Issue Type: Improvement
>>           Components: ARQ
>>             Reporter: Andy Seaborne
>>             Assignee: Andy Seaborne
>>          Attachments: JENA-595-FilterPlacement.patch
>>
>>
>
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v6.1#6144)
>