[SERVER-51459] Allow creation of index based on secondary fields of existing compound index Created: 09/Oct/20  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Louis Williams Assignee: Backlog - Storage Execution Team
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-36202 when creating new index, use existing... Closed
Assigned Teams:
Storage Execution
Participants:

 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.


Generated at Thu Feb 08 05:25:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.