改变或设置长的询问时间值为日志慢询问的MySQL
如果您 使能MySQL数据库服务器慢询问日志 您注意那个从慢询问记录文件包含比10秒query_time采取更多仅的SQL声明和询问执行或跑。 这是缺省值或询问时间门限为log_slow_queries起作用,是10秒。 10秒太长的为了SQL询问能完成,因此价值也许太高以至于不能夺取所有意味深长的数据。 您能修改或改变缓慢的询问时候降低秒钟的价值或数字。
您在MySQL配置文件,即位于/etc目录或my.ini能设置一新的long_query_time,通常的my.cnf。 简单地增加以下线到配置文件:
long_query_time = 5
在选择之上将设置慢或长的询问极限作为5秒,意味MySQL将夺取并且采伐很多时间花费的所有SQL询问比执行和完成的5秒跑到记录文件。
重要: 这是现状提供,不用保单的机器翻译的页。 计算机翻译也许是难了解。 参见 原始的英国文章 每当可能。
分享并且贡献或者得到技术支持并且帮助在 我的数字式生活论坛.
相关文章
- 使能采伐缓慢的询问(减慢询问日志)在MySQL数据库
- 改变并且重新设置MySQL根密码
- 您在vBulletin维护没有被批准执行SQL询问
- 安装网络服务器在Windows XP与Apache2、PHP5和MySQL4 -第4部分
- 重新设置MySQL服务器根密码
- 如何读MySQL二进制记录文件(BinLog)与mysqlbinlog
- 如何移动WordPress Blog向新的领域或地点
- 固定为Munin监测插入式图表的MySQL不显示或空白
- 如何使用SQL发现和替换文本在MySQL数据库
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 3
























June 20th, 2007 00:43
Stating that “10 seconds is way too long for a SQL query to complete” is slightly irresponsible, as 10 seconds might be perfectly reasonable for some queries to complete given the dataset and hardware being queried against combined with the complexity of the query.
Seeing as how this page is ranking quite high for people having performance issues with MySQL, I feel it is important to set this straight. One should not read this article and assume that their queries are performing unreasonably slow simply because they take over 10 seconds.