ChinaUnix.net
相关文章推荐:

Copying to tmp table

今天一早突然系统突然报慢,查了一下是以下语句: 6177700 username ip db——name Query 549 copying to tmp table SELECT .................... 原因如下: 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保存查询结果...

by xxdxxd - MySQL文档中心 - 2008-10-27 17:07:27 阅读(1663) 回复(0)

相关讨论

  解决一例最近常常碰到网站慢的情况,登陆到台,查询一下 /opt/mysql/bin/mysqladmin processlist;
发现一个查询状态为: Co...

by xyaxlz - MySQL - 2011-12-23 01:20:10 阅读(7141) 回复(0)

最近常常碰到网站慢的情况,登陆到后台,查询一下 /opt/mysql/bin/mysqladmin processlist; 发现一个查询状态为: copying to tmp table 而且此查询速度非常慢,基本一分钟左右才出来,后面是很多查询,状态为lock。 用命令杀掉此查询 /opt/mysql/bin/mysqladmin kill 进程号; 后面的查询一下子都好了。 ok, 找到了问题的原因,此查询效率太低。问一下程序员,找来此查询的代码,用工具进行一下简单分析。 (说明:这里是我不喜...

by clay_111 - MySQL - 2006-06-22 15:36:57 阅读(14057) 回复(4)

select s.name ,count(distinct d.deal_id) as deals_count from dl_st s left join dl_dc d on s.st_id=d.st_id and d.expired =0 and d.hidden =0 and now()>d.post_time where s.status = 1 group by s.st_id order by s.IsSmall ,deals_count desc , s.add_time desc LIMIT 10; explain: | id | select_type | table | type | possible_keys | key | key_len | ref ...

by yyxxzz - MySQL - 2009-12-30 09:59:45 阅读(8938) 回复(9)

mysql tmp_table_size
这个变量决定了内存中临时表的大小,每个线程都有一个。如果表变得特别大,myisam表就会被建在磁盘上。
优化查询语句的时候,要避免使用临时表,如果实在避免不了的话,要保证这些临时表是存在内存中的。
查看带临时表的查询语句的执行过程,这样你就可以得到需要改进的临时表。需要注意的是临时表的内
存大小是为每个线程都分配的。
如果你有复杂的查询语句,sort_buffer_size和tmp_table_si...

by sss0213 - MySQL - 2011-12-22 08:53:16 阅读(2622) 回复(0)

一般动态设置tmp_table_size的大小的时候,要使用:

  1. set global tmp_table_size=64*1024

by sss0213 - MySQL - 2011-12-20 09:46:32 阅读(1967) 回复(0)

linux 2台机器复制 主机a 从机b 表级别 主机表有20张(包含user表, 不含临时表) 现在a机器上有一user表 业务中生成了一个临时表user_tmp 表, a机器上执行一个sql update user_tmp a, user b set a.data=b.data where a.username=b.username 奇特的是每次执行这个 从机当机 Relay_Master_Log_File: mysql-bin.000525 Slave_IO_Running: Yes Slave_SQL_Running: No-----------------失败 Replicate_Do_DB: Last_Erro...

by liyihongcug - MySQL - 2010-07-09 09:20:30 阅读(1379) 回复(2)

Copyright 1994, 1995, 1996, 1999, 2000, 2001 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used d...

by qingfenglala - Linux文档专区 - 2009-08-20 15:28:00 阅读(683) 回复(0)

一般什麽情況下什麽信息會寫入/tmp目錄啊? 是不是和具體的安裝的軟體也有關啊,比如某些軟體就是設置的錯誤輸出目錄是/tmp。 如果我的根目錄撐爆了,而其他的目錄是單獨掛載的,重新安裝系統的話是不是可以保存單獨掛載目錄的信息啊?

by cheungjustin - Shell - 2010-01-01 18:47:08 阅读(1366) 回复(4)

Linux 用户(user)和用户组(group)管理 用户的角色区分; 用户在系统中是分角色的,角色不同,权限和能完成的任务也不同;值得注意的是用户的角色是通过UID和识别的;系统管理员一定要坚守UID 唯一的特性; root 用户:系统唯一,可以操作系统任何文件和命令,拥有最高权限; 虚拟用户:也被称之为伪用户或假用户,不具有登录系统的能力,却是系统运行不可缺少的用户,比如bin、daemon、adm、ftp、mail等;这类用户都系统...

by cqlouis - Linux文档专区 - 2009-09-21 13:44:25 阅读(582) 回复(0)

aaa 文件:hello.tar.gz 大小:0KB 下载: 下载 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/87077/showart_1914913.html

by tfengjun - BSD文档中心 - 2009-04-30 10:48:29 阅读(1306) 回复(0)