Search code examples
databaseindexinglsm-tree

What is the differences between the term SSTable and LSM Tree


Are these two terms used interchangeably?

I have read about how SSTable works, and usually, articles just start mentioning LSM Tree. However, they seem to be the same thing.

When should I use one term over the other?


Solution

  • Sorted Strings Table (SSTable) is a key/value string pair based file, sorted by keys.

    enter image description here

    However, LSM Tree is different:

    In computer science, the log-structured merge-tree (or LSM tree) is a data structure with performance characteristics that make it attractive for providing indexed access to files with high insert volume, such as transactional log data. LSM trees, like other search trees, maintain key-value pairs. LSM trees maintain data in two or more separate structures, each of which is optimized for its respective underlying storage medium; data is synchronized between the two structures efficiently, in batches.

    https://en.wikipedia.org/wiki/Log-structured_merge-tree

    https://upload.wikimedia.org/wikipedia/commons/f/f2/LSM_Tree.png