There are only two hard things in Computer Science: cache invalidation and naming things.
- Phil Karlton
Why bother with caching?
Let's imagine a world without any caching...
Improvements will be even more drastic on real world sites
Every request your browser makes takes additional round trip to name server get address
Providers frequently offer additional services such as a WAF, DDoS protection, image compression
"Full Page Caching reuses the generated static HTML in subsequent requests." - Me, just now
But we can't serve it all statically
"It typically speeds up delivery with a factor of 300 - 1000x, depending on your architecture." - https://varnish-cache.org/intro/
MySQL re-runs every query
Although MySQL Query Cache was meant to improve performance, it has serious scalability issues and it can easily become a severe bottleneck.
With Magento, you can expect to have a light write workload, very low concurrency and also quite complex SELECT statements. Given the results of our simple benchmarks, it is finally not that surprising that the MySQL query cache is a good fit in this case.
They are not indexes like a BTree or hash but act more like a pre-calculation table. In SQL parlance this often known as a Materialized View. This is similar to a regular view, where the table contains the results of a query but unlike a regular view which updates its contents when the row changes a Materialized View does not.
MySQL does not support Materialized Views and so Magento implemented a sort of pseudo-Materialized View.
Magento page load times tank as it chugs away calculating product prices, attribute values, and product sale-ability.