3 ms·
The article doesn't say anything about the setup, and the 150k/sec is actually a max - their mean is more like 100k/sec. > if the result of all of those querie
by silentbicycle 17y ago
The article doesn't say anything about the setup, and the 150k/sec is actually a max - their mean is more like 100k/sec.
> if the result of all of those queries is already in memory somewhere, we can send the page back in less than a second, whereas it would take longer than that if we had to go to the database for each query.
This is breaking news? Seriously, fetching data in memory is substantially faster than doing disk IO. It also helps to do the full query in one pass and inside the database, rather than several separate queries that keep dragging data back and forth. You can get a further speed-up by staying small enough to run inside the processor caches - J (http://jsoftware.com/ http://jsoftware.com/) and K (http://kx.com/ http://kx.com/) are quite fast, despite being interpreted.
While Redis has somewhat different use cases than Memcached (Redis is an in-memory db, not just a cache), it's another option.