MySQL query cache has crashed today, and a large number of online waiting on query cache mutex
So what is query cache?
QC caches the entire select result set, rather than the execution plan. The principle of qc is that the fastest way to execute a query is not to execute it.
However, QC's simple and crude failure policy, which makes it a headache, and any difference (space, Tab indentation, DML, etc.) will make the table's cache unavailable.
Failure Controlled by Single mutex, severe lock Competition
How to disable QC?
Control two parameters:
① Query_cache_type = off
② Query_cache_size = 0
In general, QC is not recommended, chicken ribs function, "chicken ribs, abandon is a pity, food is not available", resulting in dozens of hundreds of times the performance difference
If you do have this cache requirement, where the application permits it, and replace redis or Mc with high availability efficiency
By David Lin
2013-06-29
good luck