Limitations of query cache in MySQL

Source: Internet
Author: User
Recently, when I was tuning MySQL, I felt that the query cache of MySQL was not as big as possible,

Because the cache actually fails when the data table changes as follows:

Including insert, update, delete, truncate, alter table, drop table, or drop database.

Therefore, if the table is read frequently, you can adjust the query cache. Otherwise, it will not work.

Attached adjustment parameters:

Query cache parameters:

Query_cache_size the space occupied by QC. Disable the QC function by setting it to 0.

Query_cache_type 0 indicates that QC is disabled; 1 indicates normal cache; 2 indicates that SQL _cache is cached.

Query_cache_limit Maximum Cache result set

In the query_cache_min_res_unit manual, QC allocates the cache Block Size Based on this value.

Qcache_lowmem_prunes is a state variable (show status). This value increases automatically when the cache space is insufficient and the old cache needs to be released.

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.