您的位置:首页 > 数据库 > SQL

mysql查询缓慢SQL State:Copying to tmp table

2012-07-31 09:33 411 查看
平台:

OS:CentOS6.2

DB Version:MySQL 5.5.24

现象:

页面查询缓慢

处理过程:

show processlist;

非常多语句SQL State:Copying to tmp table

查询tmp_table_size 为默认16M

mysql> show variables like '%tmp%';

+-------------------+----------+

| Variable_name     | Value    |

+-------------------+----------+

| max_tmp_tables    | 32       |

| slave_load_tmpdir | /tmp     |

| tmp_table_size    | 16777216 |

| tmpdir            | /tmp     |

+-------------------+----------+

4 rows in set (0.00 sec)

/etc/my.cnf添加

tmp_table_size = 256M
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息