[SERVER-76905] Performance Issue about Clustered Collection : where there are more than one _id search condition, the search would fallback to COLLSCAN Created: 07/May/23  Updated: 11/May/23

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

Type: Bug Priority: Major - P3
Reporter: 元傑 鄭 Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File 截圖 2023-05-07 上午10.43.41.png     PNG File 截圖 2023-05-07 上午10.43.55.png    
Operating System: ALL
Steps To Reproduce:

1. use MongoDB 6.0.5 Community
2. create clustered collection
3. run query explain with { id: {$in: ["1"] }} vs {_id:

{ $in: ["1" ,"2"] }

}

Participants:

 Description   

Hi there, I try to use clustered collection. But I found out when I use find method with query {_id: { $in: ["1", "2"] }}

when there are more than one condition in $in array, the query performance is really bad because it fallback from CLUSTERED_IXSCAN to COLLSCAN


Generated at Thu Feb 08 06:33:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.