Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-572

Query: improved cost estimation for the P2 and NodeType index

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.6
    • query
    • None

    Description

      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.

      Attachments

        Activity

          People

            thomasm Thomas Mueller
            thomasm Thomas Mueller
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: