Hard Database Systems Indexing
Compare B-tree and LSM-tree storage engines.
Answer
B-trees (MySQL InnoDB, PostgreSQL) update data in-place, optimized for reads with O(log n) random I/O per operation. LSM-trees (RocksDB, Cassandra) batch writes to memory, flush sorted segments to disk, merge in background. LSM optimizes writes (sequential I/O) but reads may check multiple levels (bloom filters help). B-tree: better read latency, consistent performance. LSM: better write throughput, space efficiency with compression. Choose based on read/write ratio.
IIT Certified
Master These Concepts with IIT Certification
175+ hours of industry projects. Get placed at Bosch, Tata Motors, L&T and 500+ companies.
Relevant for Roles
Database Architect Systems Engineer Senior Software Engineer