Converting HEAP to MyISAM
作者: 曲文庆 日期: 2014-10-30 19:06
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 STATUSstatement 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:
MySQL 5.6 Warning - Using a password on the command line interface can be insecur 解决方案 (2015-04-23 11:52)
MySQL Error 2006 MySQL server has gone away原因分析 (2014-10-29 16:55)
Install Atlas in CentOS 6 (2014-03-12 12:01)
mysqldump 出現general_log 錯誤 (2011-01-07 20:24)
mysql导出符合条件的数据(含字符集) (2010-11-03 10:04)
深入了解MySQL 5.5分区功能增强 (2010-05-19 10:18)
MySQL /bin/rm: cannot remove `libtoolT': No such file or directory (2010-05-19 09:57)
MySQL配置文件my.cnf (2009-12-29 22:29)
MySQL创始人力劝用户暂缓部署MySQL 5.1 (2008-12-03 09:10)