小编Tan*_*Tan的帖子

我如何清理 mysql 上的临时表

我们在过程中创建临时表,我们没有为 mysql 使用持久连接。mysql重启后有很多临时表在缓慢增加然后innodb_buffer_pool_size完成。

应用程序正在此服务器上运行;

CPU E3-1245 v5 @ 3.50GHz - 8 核 16GB 内存

图像显示 tmp 表如何增加:

照片显示了 tmp 表是如何增加的

我的.cnf:

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

skip_name_resolve

join_buffer_size = 4M
sort_buffer_size = 1M
read_rnd_buffer_size = 1M

# MyISAM #
key_buffer_size                 = 1G
# SAFETY #
max_allowed_packet              = 1G
# CACHES AND LIMITS #
tmp_table_size                 = 16M
max_heap_table_size            = 16M
query_cache_type               = 1
query_cache_size               = 1M
query_cache_limit              = 1M
max_connections                = 400
thread_cache_size              = 100
open_files_limit               = 65535
table_definition_cache         = 4096
table_open_cache               = 4096 …
Run Code Online (Sandbox Code Playgroud)

mysql innodb temporary

5
推荐指数
1
解决办法
7731
查看次数

标签 统计

innodb ×1

mysql ×1

temporary ×1