-
Type: Bug
-
Resolution: Gone away
-
Priority: Major - P3
-
None
-
Affects Version/s: 4.2.0, 4.4.0, 5.0.0-rc0
-
Component/s: None
-
Storage Engines
-
5
-
Nick - 2024-04-30
This is being split off from SERVER-56509, which made a change that improved a performance regression on unique indexes, however, update performance is still an order of magnitude worse on unique indexes than non-unique indexes. This is reproducible back to 4.2.
Quoting myself:
I wrote a reproducer (attached as "
SERVER-56509.js") for the multi-update problem, and the "prefix_key" change does not appear to have completely resolved the regression related to updates on unique indexes. Locally, a multi-update on a non-unique index field for 10K docs took about 250ms. The same update on a unique field took about 15s without the "prefix_key" change and about 8s with the "prefix_key" change.
I also discovered that the regression only exists if a unique field is updated to a value that sorts before the original key. For example, updating an index field from "ZZZ" to "AAA" triggers the regression, but updating the same field from "AAA" to "ZZZ" does not. I assume this is because of the way MongoDB constructs KeyStrings for seeking when calling _keyExists.
- is related to
-
SERVER-56509 Wrap unique index insertion _keyExists call in a WT cursor reconfigure.
- Closed
- related to
-
WT-7264 Creating a new configuration for search near that allows it to exit quickly when searching for prefixes
- Closed