-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
5
-
Storage Engines - 2022-12-12, Storage Engines - 2023-01-10, StorEng - 2023-01-24
Summary
Performance analysis of some queries has shown that a lot of time is spent in WT_CURSOR->get_key and WT_CURSOR->get_value. Some of the time is due to how these vararg functions are coded, and in how the va_list is passed to a subordinate function. For the specific MongoDB case where the key format and value format are both "u", there are much cheaper ways to assigning to the (single) output argument.
This came out of a slack discussion initiated by ian.boros@mongodb.com.
Three specific approaches have been mentioned:
- Add a new API call (WT_CURSOR->get_raw_key_value?) to get both key and value in "raw" form (format "u").
- Notice on cursor open that we have "u" format and change the get_value and/or get_key "virtual functions" to specialized versions that are declared with var_args, but coded efficiently for this case.
- Same as previous, but specialized versions are declared with a WT_ITEM * argument. Not strictly ANSI-C, but is likely valid on many platforms. We would limit the implementation to only verified platforms.
- is depended on by
-
SERVER-69105 Achieve column index performance acceptable for release
- Closed
- is related to
-
SERVER-72882 Use new WT get_key_value API
- Closed
- related to
-
WT-11634 Investigate optimizations for the set_key/value functions for MongoDB index use cases.
- Closed