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

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

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Execution

      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.

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            louis.williams@mongodb.com Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: