In the MySQL database, Opened_tables indicates the number of opened tables. The following describes the rational configuration of MySQL Open_Table.
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:
Copy codeThe Code is as follows:
Mysql> show global status like 'open % tables % ';
+ --------------- + ------- +
| Variable_name | Value |
+ --------------- + ------- +
| Open_tables | 919 |
| Opened_table | 1951 |
+ --------------- + ------- +
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:
Copy codeThe Code is as follows:
Mysql> show variables like 'table _ cache ';
+ --------------- + ------- +
| Variable_name | Value |
+ --------------- + ------- +
| Table_cache | 2048 |
+ --------------- + ------- +
MySQL Open_Table has the following values:
Copy codeThe Code is as follows:
Open_tables/Opened_tables * 100%> = 85%
Open_tables/table_cache * 100%