Copying to tmp table on disk The temporary result set was larger than tmp_table_size and the thread is now changing the in memory-based temporary table to a disk based one to save memory.
哦,原来是这样的,如果查询超出了tmp_table_size的限制,那么 mysql 用/tmp保存查询结果,然后返回给客户端。
set global tmp_table_size=209715200 (200M) 再次 运行此查询,用/opt/mysql/bin/mysqladmin processlist;
进行观察,发现 不会 出现上述 问题 .
至此问题解决. 调节tmp_table_size 的 时候 发现另外一些参数
Qcache_queries_in_cache 在缓存中已注册的查询数目
Qcache_inserts 被加入到缓存中的查询数目
Qcache_hits 缓存采样数数目
Qcache_lowmem_prunes 因为缺少内存而被从缓存中删除的查询数目
Qcache_not_cached 没有被缓存的查询数目 (不能被缓存的,或由于 QUERY_CACHE_TYPE)
Qcache_free_memory 查询缓存的空闲内存总数
Qcache_free_blocks 查询缓存中的空闲内存块的数目
Qcache_total_blocks 查询缓存中的块的总数目
Qcache_free_memory 可以缓存一些常用的查询,如果是常用的sql会被装载到内存。那样会增加数据库访问速度