You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Thomas Mueller (JIRA)" <ji...@apache.org> on 2013/01/23 13:42:13 UTC

[jira] [Resolved] (OAK-572) Query: improved cost estimation for the P2 and NodeType index

     [ https://issues.apache.org/jira/browse/OAK-572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Mueller resolved OAK-572.
--------------------------------

    Resolution: Fixed

It looks much better now in revision 1436361. Closing for now.
                
> Query: improved cost estimation for the P2 and NodeType index
> -------------------------------------------------------------
>
>                 Key: OAK-572
>                 URL: https://issues.apache.org/jira/browse/OAK-572
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: query
>            Reporter: Thomas Mueller
>            Assignee: Thomas Mueller
>            Priority: Minor
>
> Currently, the P2 index (and therefore also the NodeType index) count the number of nodes up to configurable number of nodes. To improve the query plan, the number of returned nodes should be estimated. There are multiple ways, for example
> - Using stored statistics (store the number of child nodes for each index lookup). This is very accurate, but requires to update the statistic from time to time, and this is slow and therefore probably needs to run in background process
> - Read a number of nodes (as it's done now), and then estimate the number of nodes for the lookup based on the average depth and width of the matches (the deeper the tree, the more expected matches). This is somewhat accurate, and does not require too much code.

--
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