Rational configuration of MySQL Open_Table

Source: Internet
Author: User
Tags mysql functions

MySQL Opened_tables indicates the number of opened tables. The following describes how to reasonably configure the value of MySQL Open_Table. It is helpful for you to learn about MySQL databases.

MySQL Open_Table:

 
 
  1. mysql> show global status like 'open%tables%';  
  2. +---------------+-------+  
  3. | Variable_name | Value |  
  4. +---------------+-------+  
  5. | Open_tables | 919 |  
  6. | Opened_tables | 1951 |  
  7. +---------------+-------+ 

MySQL Open_tables indicates the number of opened tables. If the number of MySQL Opened_tables is too large, the value of table_cache in the configuration may be too small (table_open_cache after 5.1.3). Let's query the value of table_cache on the server:

 
 
  1. mysql> show variables like 'table_cache';  
  2. +---------------+-------+  
  3. | Variable_name | Value |  
  4. +---------------+-------+  
  5. | table_cache | 2048 |  
  6. +---------------+-------+ 

MySQL Open_Table has the following values:

 
 
  1. Open_tables / Opened_tables * 100% >= 85%  
  2. Open_tables / table_cache * 100%  

How to enable MySQL slow Query

Two methods for implementing MySQL multi-table join query

How to Create MySQL Functions

Take you to understand mysql Variables

How to revoke permissions and delete MySQL users

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.