MySQL troubleshoting: waiting on query cache mutex

Source: Internet
Author: User
Tags mysql query

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.