[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: |
|
||||
| Issue Links: |
|
||||
| Assigned Teams: |
Query Optimization
|
||||
| Participants: | |||||
| Case: | (copied to CRM) | ||||
| 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. |