Home Database Mysql Tutorial MySQL服务器创建临时文件数的配置_MySQL

MySQL服务器创建临时文件数的配置_MySQL

Jun 01, 2016 pm 01:39 PM
server

bitsCN.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
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

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to solve the problem that eMule search cannot connect to the server How to solve the problem that eMule search cannot connect to the server Jan 25, 2024 pm 02:45 PM

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

Detailed explanation of CentOS installation fuse and CentOS installation server Detailed explanation of CentOS installation fuse and CentOS installation server Feb 13, 2024 pm 08:40 PM

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 Solution to the inability to connect to the RPC server and the inability to enter the desktop Feb 18, 2024 am 10:34 AM

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 Best Practice Guide for Building IP Proxy Servers with PHP Mar 11, 2024 am 08:36 AM

Best Practice Guide for Building IP Proxy Servers with PHP

How to enable TFTP server How to enable TFTP server Oct 18, 2023 am 10:18 AM

How to enable TFTP server

How to configure Dnsmasq as a DHCP relay server How to configure Dnsmasq as a DHCP relay server Mar 21, 2024 am 08:50 AM

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 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 Mar 13, 2024 pm 04:40 PM

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? How to install PHP FFmpeg extension on server? Mar 28, 2024 pm 02:39 PM

How to install PHP FFmpeg extension on server?

See all articles