Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-51459

Allow creation of index based on secondary fields of existing compound index

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Storage Execution

    Description

      For example, using an existing index on {a:1, b:1}, support creating a new index on {b:1} or {b:1} with partialFilterExpression on 'a'.

      From SERVER-36202:

      This might be an improvement. We would still need to sort the keys for 'b'. We wouldn't need to scan the collection to generate keys, but we would need scan the index to generate new keys. This improvement would have to come from avoiding key generation from BSON to KeyString, which is very highly optimized. We would have to show that key generation from an existing KeyString(a,b) -> KeyString(b) is significantly faster than BSON -> KeyString.

      In addition, this should also have a smaller memory footprint by avoiding the need to page in full documents.

      Attachments

        Activity

          People

            backlog-server-execution Backlog - Storage Execution Team
            louis.williams@mongodb.com Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: