CPC G06F 16/214 (2019.01) [G06F 16/2246 (2019.01); G06F 21/6227 (2013.01)] | 16 Claims |
1. A method for performing a multi-level merge operation that involves at least three levels of a log-structured merge tree (LSM tree), the method comprising:
storing, by a computer system, files across a plurality of levels included in the LSM tree, wherein a given file stores a set of records associated with a set of database keys;
determining, by the computer system, to perform the multi-level merge operation for a particular merge key range; and
performing, by the computer system, the multi-level merge operation, including:
identifying levels of the LSM tree from which to copy records that fall within the particular merge key range into a target level of the LSM tree, wherein the identifying includes assessing a number of records contributed by ones of the plurality of levels for the particular merge key range and selecting sufficient levels for the multi-level merge operation to merge at least a threshold number of records into the target level, and wherein the identified levels include the at least three levels of the LSM tree; and
copying, from the identified levels, a set of records that fall within the particular merge key range into a file at the target level.
|