[SERVER-11965] Allow compound indexes using single elements from multiple arrays Created: 05/Dec/13  Updated: 09/Jan/23

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

Type: Improvement Priority: Minor - P4
Reporter: Norman Graham Assignee: Backlog - Query Optimization
Resolution: Unresolved Votes: 2
Labels: query-44-grooming
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File compoundIndexWithArrayElements.js    
Issue Links:
Depends
Assigned Teams:
Query Optimization
Participants:
Case:

 Description   

MongoDB currently disallows compound indexes whose components are single array elements selected by position from multiple arrays.

However, MongoDB does allow compound indexes whose components are single array elements selected by position from a single array. Furthermore, the resulting index is not multiKey.

Given that neither of these indexes should be multiKey, the check for multiple arrays at https://github.com/mongodb/mongo/blob/r2.4.8/src/mongo/db/indexkey.cpp#L232 may be a little too restrictive.


Generated at Thu Feb 08 03:27:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.