2024-01-03

Performance of In-memory Databases

Counterintuitively, the performance advantage of in-memory databases is not due to the fact that they don’t need to read from disk Even a disk-based storage engine may never need to read from disk if you have enough memory, because the operating system caches recently used disk blocks in memory anyway. Rather, they can be faster because they can avoid the overheads of encoding in-memory data structures in a form that can be written to disk.

From Chapter 3 in Designing Data-Intensive Applications book.