
How Databases Actually Store Data: B-Trees vs LSM-Trees
PostgreSQL and RocksDB both answer point queries and range scans, but their on-disk layouts could not be more different. Here is how B-trees and LSM-trees actually store your data, why one trades read speed for write speed, and how to pick between them.