[SERVER-60808] mongodb3.4 upgrade 4.2, query plan isMultiKey attributes change Created: 19/Oct/21 Updated: 27/Oct/23 Resolved: 04/Nov/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | 杰城 施 | Assignee: | Edwin Zhou |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Operating System: | ALL |
| Participants: |
| Description |
|
table like this: insert command: ); ); *In mongodb 4.2* , { name: "IX_first_student", }); query: result: }, , , } *mongodb3.4* , { name: "IX_first_student", }); query: result: }, , , } question is why in mongodb 4.2 isMultiKey is true? in mongodb 4.2, this behavior make some query can't hint index, plz help. |
| Comments |
| Comment by Edwin Zhou [ 04/Nov/21 ] |
|
Thanks for following up that creating an index with partialFilterExpression resolved this issue after upgrading from 3.4 to 4.2. A number of changes were made to indexing since MongoDB v3.2 and it's possible one of those changes may have affected what you see in the explain plan. If you're interested, you may be able to find some of the changes made here Since you've been able to work around this problem, I will now close this ticket. Best, |
| Comment by 杰城 施 [ 26/Oct/21 ] |
|
i using partialFilterExpression to createIndex, fix this problem |