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

Thomas Mueller edited comment on OAK-4076 at 3/2/16 7:36 AM:
-------------------------------------------------------------

I like the approach. But instead of hardcoding "jcr:uuid" and "uuid", we could 
use the following heuristic / naming convension, which would increase 
performance for even more cases:

* Get all property restrictions using Filter.getPropertyRestrictions
* For each usable restriction, check if there is an index node that matches 
either the localname or (using camel case) the name of the property. So for 
"jcr:uuid" restriction, look for an index named "uuid" and then "jcrUuid". For 
a property restriction on "slingevent:Job", look for "job" and then 
"slingeventJob", and so on.
* We would need to stop the loop once we find a low cost index.



was (Author: tmueller):
I like the approach. But instead of hardcoding "jcr:uuid" and "uuid", we could 
use the following heuristic / naming convension, which would increase 
performance for even more cases:

* Get all property restrictions using Filter.getPropertyRestrictions
* For each usable restriction, check if there is an index node that matches 
either the localname or (using camel case) the name of the property. So for 
"jcr:uuid" restriction, look for an index named "uuid" and then "jcrUuid". For 
a property restriction on "slingevent:Job", look for "job" and then 
"slingeventJob", and so on.



> Benchmark to measure affect of number of indexes on query performance
> ---------------------------------------------------------------------
>
>                 Key: OAK-4076
>                 URL: https://issues.apache.org/jira/browse/OAK-4076
>             Project: Jackrabbit Oak
>          Issue Type: Task
>          Components: run
>            Reporter: Chetan Mehrotra
>            Assignee: Chetan Mehrotra
>            Priority: Minor
>             Fix For: 1.6
>
>         Attachments: OAK-4076-v1.patch
>
>
> This is related to OAK-1273. I would like to have a benchmark to see how 
> increase in number of indexes affect uuid lookup. Currently uuid lookup 
> relies on query so the trend would be similar for other queries



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to