anim-slides demo

cache-compare

The same four reads raced on one clock without and with a cache; 180 ms database reads keep growing while 8 ms hits stop almost at once, and database load climbs to 96 % on one side but stays at 24 % on the other.

Without cache every read → database bars to scale read 1 180 ms read 2 180 ms read 3 180 ms read 4 180 ms load 0 % 24 % 48 % 72 % 96 % 0 reads 1 read 2 reads 3 reads 4 reads With cache miss → DB, fill, then cache hit read 1 185 ms read 2 8 ms read 3 8 ms read 4 8 ms load 0 % 24 % 0 reads 1 read 75 % fewer database reads First read misses and fills the cache Later reads hit the cache 22× faster on cache hits, 75 % fewer database reads illustrative

Swipe sideways to see the whole figure.