Episode 417: Alex Petrov on Database Storage Engines

Topics covered
Popular Clips
Episode Highlights
B-Trees
B-Trees play a crucial role in database management by optimizing search operations. explains that B-Trees reduce search space by storing keys in sorted order, allowing efficient binary search within memory segments. This structure enables databases to fetch and read single pages from disk, minimizing disk seeks and enhancing performance 1.
In terms of disk seeks, you're going to have as many disk seeks as you have levels.
---
Binary search trees, while useful, lack the balance and capacity of B-Trees, which grow exponentially with each level, making them ideal for large datasets 2.
LSM vs B-Trees
The comparison between LSM Trees and B-Trees highlights their distinct advantages in database storage. notes that LSM Trees excel in write operations by buffering writes in memory and appending them to disk, which contrasts with B-Trees that require locating the exact position for updates 3. This approach allows LSM Trees to handle writes efficiently, while B-Trees are optimized for read operations.
LSM Trees have a bad rap for reads, but they can be very good for reads in certain use cases.
---
Additionally, LSM Trees use a write-ahead log for durability, ensuring data is safely stored even during memory-disk transitions 4.
Related Episodes


364: Peter Zaitsev on Choosing the Right Open Source Database
Answers 383 questions

Episode 189: Eric Lubow on Polyglot Persistence
Answers 383 questions

Episode 199: Michael Stonebraker on Current Developments in Databases
Answers 383 questions

Episode 413: Spencer Kimball on CockroachDB
Answers 383 questions

SE-Radio Episode 353: Max Neunhoffer on Multi-model databases and ArangoDB
Answers 383 questions

SE-Radio Episode 243: RethinkDB with Slava Akhmechet
Answers 383 questions

Episode 454: Thomas Richter Postgres as an OLAP database
Answers 383 questions

Episode 179: Cassandra with Jonathan Ellis
Answers 383 questions

Episode 433: Jay Kreps on ksqlDB
Answers 383 questions

Episode 194: Michael Hunger on Graph Databases
Answers 383 questions

Episode 398: Apache Kudu with Adar Leiber Dembo
Answers 383 questions

SE Radio 605: Yingjun Wu on Streaming Databases
Answers 383 questions

Episode 68: Dan Grossman on Garbage Collection and Transactional Memory
Answers 383 questions

SE-Radio Episode 292: Philipp Krenn on Elasticsearch
Answers 383 questions

Episode 44: Interview Brian Goetz and David Holmes
Answers 383 questions













