-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
Execution Team 2020-04-06, Execution Team 2020-04-20
-
0
Index builds allocate a single, small buffer for each key generated. For index builds with small keys, much of the index build CPU time is spent just in memory allocation.
It is generally faster to allocate fewer, larger memory regions than numerous, smaller ones. We can speed up index builds by allocating a few large buffers for key generation and sorting the pointers to keys within those buffers.
This has the added benefit of having better cache locality for sorting since all keys will be nearby in memory.
- causes
-
SERVER-61094 Generating KeyStrings from MultiIndexBlock can result in memory limits not being respected
- Closed
- related to
-
SERVER-47349 Use flat_set instead of set for KeyStringSet and MultikeyPaths
- Closed
-
SERVER-47350 Reuse temporary data structures during index builds
- Closed
-
SERVER-47416 Eliminate copying of data structures in keystring generation code path
- Closed
-
SERVER-47417 Add google benchmark for btree key generator
- Closed
-
SERVER-47476 Make it possible to store a few elements in MultikeyComponents and MultikeyPaths without having to allocate memory
- Closed