In the MySQL database, Opened_tables represents the number of open tables, the following is a detailed description of the reasonable configuration of the MySQL open_table.
MySQL Opened_tables represents the number of open tables, and the following will teach you how to reasonably configure the values of MySQL open_table, and I hope it will help you learn the MySQL database.
MySQL open_table Situation:
Copy Code code as follows:
Mysql> show global status like ' open%tables% ';
+---------------+-------+
| variable_name | Value |
+---------------+-------+
| Open_tables | 919 |
| Opened_tables | 1951 |
+---------------+-------+
The MySQL open_tables represents the number of open tables, and if the number of MySQL opened_tables is too large, the value of Table_cache in the configuration (called Table_open_cache after 5.1.3) may be too small, Let's check the server Table_cache values:
Copy Code code as follows:
Mysql> Show variables like ' Table_cache ';
+---------------+-------+
| variable_name | Value |
+---------------+-------+
| Table_cache | 2048 |
+---------------+-------+
MySQL open_table more appropriate values are:
Copy Code code as follows:
Open_tables/opened_tables * 100% >= 85%
Open_tables/table_cache * 100%