MySQL服务器创建临时文件数的配置_MySQL
Jun 01, 2016 pm 01:39 PMbitsCN.com
MySQL服务器创建的临时文件的数量多少合适呢?下面就对MySQL服务器创建临时文件数的合理配置作详尽的分析讨论,供您参考。
mysql
>
show global status like 'created_tmp%';
+-------------------------+---------+
| Variable_name | Value |
+-------------------------+---------+
| Created_tmp_disk_tables | 21197 |
| Created_tmp_files | 58 |
| Created_tmp_tables | 1771587 |
+-------------------------+---------+
每次创建临时表,Created_tmp_tables增加,如果是在磁盘上创建临时表,Created_tmp_disk_tables也增加,Created_tmp_files表示MySQL服务创建的临时文件文件数,比较理想的配置是:
Created_tmp_disk_tables / Created_tmp_tables * 100%
比如上面的服务器Created_tmp_disk_tables / Created_tmp_tables * 100% = 1.20%,应该相当好了。
我们再看一下MySQL服务器对临时表的配置:
mysql
>
show variables where Variable_name in (‘tmp_table_size', 'max_heap_table_size’);
+---------------------+-----------+
| Variable_name | Value |
+---------------------+-----------+
| max_heap_table_size | 268435456 |
| tmp_table_size | 536870912 |
+---------------------+-----------+
只有256MB以下的临时表才能全部放内存,超过的就会用到硬盘临时表。
bitsCN.com
Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

How to solve the problem that eMule search cannot connect to the server

Detailed explanation of CentOS installation fuse and CentOS installation server

Solution to the inability to connect to the RPC server and the inability to enter the desktop

Best Practice Guide for Building IP Proxy Servers with PHP

How to configure Dnsmasq as a DHCP relay server

What should I do if I can't enter the game when the epic server is offline? Solution to why Epic cannot enter the game offline

How to install PHP FFmpeg extension on server?
