Databases · Flashcard

A key in an LSM tree may be in any of dozens of SSTables. What keeps reads from checking all of them?

hard Data structures

Answer

A Bloom filter per SSTable skips files that cannot hold the key, a sparse index finds the right block in a file in one seek, and compaction keeps the number of files low. Recent data is answered from the memtable and caches.

Review this in your daily deck All cards in Databases