In LevelDB, are all the keys loaded in memory?
Solution 1:
So, I did find out that there is a memtable which holds the keys and values in memory and when this memtable becomes more than some specific size - the compaction process occurs. And so the memtable is written to a SST and emptied. So, it appears that all the keys are not stored in memory and LevelDB does use binary search on files using a concept of restart points in the SST file.