[ 
https://issues.apache.org/jira/browse/OAK-1894?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14033333#comment-14033333
 ] 

David Gonzalez commented on OAK-1894:
-------------------------------------

[~justinedelson] I think listing all index candidate property names would be 
useful to help understand/make immediately clear 1) if you're missing an index 
for a property and 2) if certain operations (like, not) are preventing a 
property from being resolved to an index.


> PropertyIndex only considers the cost of a single indexed property
> ------------------------------------------------------------------
>
>                 Key: OAK-1894
>                 URL: https://issues.apache.org/jira/browse/OAK-1894
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: query
>            Reporter: Justin Edelson
>             Fix For: 1.1, 1.0.2
>
>         Attachments: OAK-1894-advanced.diff, OAK-1894.patch
>
>
> The existing PropertyIndex loops through the PropertyRestriction objects in 
> the Filter and essentially only calculates the cost of the first indexed 
> property. This isn't actually the first property in the query and 
> Filter.propertyRestrictions is a HashMap.
> More confusingly, the plan for a query with multiple indexed properties 
> outputs *all* indexed properties, even though only the first one is used.
> For queries with multiple indexed properties, the cheapest property index 
> should be used in all three relevant places: when calculating the cost, when 
> executing the query, and when producing the plan.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to