sunisdown / note

note
1 stars 0 forks source link

storage engine: index + log vs page-based storage #3

Open sunisdown opened 3 years ago

sunisdown commented 3 years ago

目前常见的存储引擎基本可以分为两种类型,一种是索引+日志类型,写操作可以简化为日志追加,然后更新索引。另外一种是 page-based storage,像 B-Tree 系列的。这两种方式各有优劣。

sunisdown commented 3 years ago

举例

Index + Log

B*-Tree

sunisdown commented 3 years ago
  • LSM(LevelDB, RocksDB)

LSM 严格上来说不能算是 Index + Log,但是他们形式上非常接近。

sunisdown commented 3 years ago

https://news.ycombinator.com/item?id=9248298 下面的讨论非常好玩,比文章精彩。