-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Index Maintenance
-
Labels:None
-
Fully Compatible
-
Execution Team 2019-10-21
There are a few calls to KeyString::getKeySize() in WiredTigerIndex such as here to determine if the KeyString has a RecordId appended. We should avoid calling this method when possible because it reconstructs the entire KeyString which is an expensive operation.
There are a couple known cases when we know whether the RecordId is appended to the KeyString or not.
- _id indexes: these never have the RecordId appended.
- Non-unique indexes: they always have the RecordId appended.