Tricks from in-memory databases
summary
Examines concrete prototypes and numbers: specialization of sort routines shows about 30% faster sort by inlining compare paths; a B-tree variant that embeds integer compare logic yields roughly 24% faster primary-key inserts and ~10–15% faster lookups; cache-friendly page layouts give only ~2.5% on index lookups and lose benefit after updates; adding a per-page buffer pointer sometimes saves ~5% in microbenchmarks but hurts on larger servers; pointer swizzling and optimistic lockless reads prove fragile or impractical in current Postgres.
AI-written summary · about
chapters (9)
- 0:00Start
- 1:15Memory hierarchies, latency numbers and in-memory systems
- 8:20Code specialization
- 17:02Buffer manager and indirection of oversized attributes
- 19:18Pointer swizzling
- 26:13Page layout and cache friendliness
- 32:02Optimistic buffer locking
- 34:59Conclusion
- 36:10Questions








