-
Type: Improvement
-
Resolution: Won't Do
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Storage Execution
We should be able to copy the multikey state from the existing multikey index without having to track any inserts into the bulk builder.
For example, say we have an existing multikey index on {a: 1, b: 1} and the following keys (a, b, RecordId) generated from a document { a: [1, 2, 3], b: 1 }:
- (1, 1, RID(1))
- (2, 1, RID(1))
- (3, 1, RID(1))
If we use this index to build a new index on {a: 1}, we can directly insert these keys into the new index:
- (1, RID(1))
- (2, RID(1))
- (3, RID(1))
Since the multikey keys are in the index already, and we're building an index on 'a' which is the key that makes the index multikey, the new index should just be able to copy the existing multikeypaths, truncating everything after "a".
- related to
-
SERVER-36202 when creating new index, use existing index if possible to avoid collection scan
- Backlog