Converting HEAP to MyISAM in SHOW PROCESSLIST



http://www.mysqlab.net/knowledge/kb/detail/topic/myisam/id/6149

Discussion

The state "converting HEAP to MyISAM" happens when a query that needs a temporary table is converting from an in-memory temporary table to a disk-based temporary table.

 

MySQL uses memory-based temporary tables up to the size limit set by the tmp_table_size system variable. If a query needs a temporary table larger than this it will be converted to a disk-based temporary table using the MyISAM storage engine.

 

GROUP BY queries and ORDER BY queries that can't use an index for the ordering are the most common causes of temporary table creation.

 

Solution

You could consider raising the per-session value of tmp_table_size if you have sufficient memory. Use the SHOW GLOBAL STATUS statement to see the value of the Created_tmp_tables variable. It will show the total number of temporary tables that have been created:

SHOW GLOBAL STATUS LIKE 'Created_tmp_tables';

+--------------------+-------+
| Variable_name      | Value |
+--------------------+-------+
| Created_tmp_tables | 13    | 
+--------------------+-------+

The

Created_tmp_disk_tables

variable shows how many of those have been converted to disk temporary tables:

 

SHOW GLOBAL STATUS LIKE 'Created_tmp_disk_tables';

+-------------------------+-------+
| Variable_name           | Value |
+-------------------------+-------+
| Created_tmp_disk_tables | 1     | 
+-------------------------+-------+

 

 

调2个参数

tmp_table_size和max_heap_table_size ============> converting HEAP to MyISAM


原文地址:http://7567567.blog.51cto.com/706378/630036



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值