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

Add a compound index for _modified + _id

    XMLWordPrintableJSON

Details

    Description

      As explained in OAK-1966 diff logic makes a call like

      db.nodes.find({ _id: { $gt: "3:/content/foo/01/", $lt: "3:/content/foo010" }, _modified: { $gte: 1405085300 } }).sort({_id:1})

      For better and deterministic query performance we would need to create a compound index like {_modified:1, _id:1}. This index would ensure that Mongo does not have to perform object scan while evaluating such a query.

      Care must be taken that index is only created by default for fresh setup. For existing setup we should expose a JMX operation which can be invoked by system admin to create the required index as per maintenance window

      Attachments

        Issue Links

          Activity

            People

              mreutegg Marcel Reutegger
              chetanm Chetan Mehrotra
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: