Tune table_cache appropriately to mysql to work faster _ MySQL

Source: Internet
Author: User
By appropriately adjusting table_cache, mysql can work faster in our consciousness. we usually increase table_cache and try to keep opened table handles in the cache. mysql can respond to operations more quickly, however, when I increase the size of table_cache, the cpu increases a lot. I found that the bigger the size of table_cache is, the better, because mysql only has one global lock to control the opening and closing of tables, that is to say, no matter how many threads are executing in parallel, there is only one thread that can open or close the table, which will lead to many deadlocks. other threads are waiting for that global lock, the cpu consumption is increased correspondingly, the SQL execution time of other linked threads is extended, and the system performance is reduced. Therefore, when table_cache is sufficient, try to keep table_cache small enough, but I still have to learn how to grasp this degree.

References:

About table_cache

Side effects of table_cache

We are running fast

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.