-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Query Execution
-
None
-
Fully Compatible
-
ALL
-
v6.0, v5.0, v4.4
-
-
QE 2022-07-25, QE 2022-08-08, QE 2022-08-22, QE 2022-10-03
-
(copied to CRM)
Update performance appears to suffer greatly if there are multiple secondary indexes with the same first field in a key. This does not appear to have an obvious reason, because using a hint improves performance significantly.
For example:
- Say collection has two secondary indexes
{a: 1, b: 1}
and
{a: 1, c: 1}with 100K documents
- Perform a multi update on {a: <value>}
- This query takes 4 minutes. If an index is dropped or a hint is used, the same query performance improves to around 200ms.
- As additional indexes are added, performance degrades linearly
In the server ticket https://jira.mongodb.org/browse/SERVER-57095?filter=-1, adding the hint decreased the query time by several minutes. From 5 minutes without the hint to about 14 seconds after the hint was added.
If you run the attach replication test you'll see that without the hint it takes 234,335 milliseconds and with the hint it takes 3,347 milliseconds.
Seems to be related to https://jira.mongodb.org/browse/SERVER-57221
- is depended on by
-
SERVER-57221 Inconsistent delete performance on collections with multiple secondary indexes on same key
- Closed
- is related to
-
SERVER-57221 Inconsistent delete performance on collections with multiple secondary indexes on same key
- Closed
-
SERVER-57095 Increase number of zones in resharding_large_number_of_initial_chunks.js
- Closed