Home > Database > Mysql Tutorial > MySQL性能优化之Open_Table配置参数的合理配置建议_MySQL

MySQL性能优化之Open_Table配置参数的合理配置建议_MySQL

WBOY
Release: 2016-05-31 08:48:39
Original
1215 people have browsed it

在MySQL数据库中,Opened_tables表示打开过的表数量,下面将对MySQL Open_Table的合理配置作详细的说明介绍。

MySQL Opened_tables表示打开过的表数量,下文就将教您如何合理配置MySQL Open_Table的值,希望对您学习MySQL数据库能有所帮助。

MySQL Open_Table情况:
复制代码 代码如下:
mysql> show global status like 'open%tables%'; 
+---------------+-------+ 
| Variable_name | Value | 
+---------------+-------+ 
| Open_tables   | 919   | 
| Opened_tables | 1951  | 
+---------------+-------+
MySQL Open_tables表示打开表的数量,如果MySQL Opened_tables数量过大,说明配置中table_cache(5.1.3之后这个值叫做table_open_cache)值可能太小,我们查询一下服务器table_cache值:
复制代码 代码如下:
mysql> show variables like 'table_cache'; 
+---------------+-------+ 
| Variable_name | Value | 
+---------------+-------+ 
| table_cache   | 2048  | 
+---------------+-------+
MySQL Open_Table比较合适的值为:
复制代码 代码如下:
Open_tables / Opened_tables * 100% >= 85% 
Open_tables / table_cache * 100%

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template