Details
-
Bug
-
Resolution: Duplicate
-
Major - P3
-
None
-
None
-
None
-
None
-
Query Execution
-
ALL
-
-
QO 2023-11-13
-
(copied to CRM)
Description
(This ticket is one of several issues we at TableCheck had when upgrading from MongoDB 6.0.11 to 7.0.2; refer to https://support.mongodb.com/case/01207868)
We have a collection Customers with a scalar ID field "customer_user_id" (foreign key). When we query with complex conditions on this field, we see queries taking up to 10 seconds, for example:
"filter": { |
"franchise_id": "5b3069a900869bb32e00143f", |
"customer_user_id": "6267a29a50102f009b84e9d1" |
}
|
(matches 1 document, executionTimeMillis = 6961) |
If we remove the franchise_id condition, the query returns immediately:
"filter": { |
"customer_user_id": "6267a29a50102f009b84e9d1" |
}
|
|
|
(matches 2 documents, executionTimeMillis = 0) |
Note that both queries are ultimately selecting the same index (customer_user_id_1).
Anecdotally we did not see the same issue on the "Classic" query engine. Also, if we hint the affected query with the index it ultimately selects, it executes immediately (executionTimeMillis = 1)
Attachments
Issue Links
- duplicates
-
SERVER-62150 SBE Multiplanning can be slow when suboptimal plan runs first
-
- Open
-
- is related to
-
SERVER-82677 Deduplicate index scan + fetch plans guaranteed to have similar performance
-
- In Code Review
-
- related to
-
SERVER-82764 Make "planningTimeMicros" incorporate time from the multi-planner trial period
-
- Closed
-