改变或设置长的询问时间值为日志慢询问的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秒跑到记录文件。

重要: 这是现状提供,不用保单的机器翻译的页。 计算机翻译也许是难了解。 参见 原始的英国文章 每当可能。

分享并且贡献或者得到技术支持并且帮助在 我的数字式生活论坛.



One Response to “Change or Set MySQL Long Query Time Value for log-slow-queries”

  1. Todd
    June 20th, 2007 00:43
    1

    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.

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe without commenting


Custom Search

New Articles

Incoming Search Terms for the Article

log-slow-queries - mysql long query time - mysql long_query_time - mysql max query time - mysql long queries - mysql slow query time - mysql long query - long-query-time - long query time - mysql long-query-time - mysql time limit - mysql maximum query time - mysql kill long query - slow query time - mysql limit query time - log slow queries - long_query_time mysql - mysql query time limit - mysql long - mysql long running queries - log-slow-queries long_query_time - long query time mysql - mysql set long_query_time - set long_query_time - mysql change time - change long_query_time - long_query_time - long running queries mysql - mysql slow queries time - long-query-time MySQL - mysql long time query - long queries mysql - mysql set query time limit - query takes long time - long_query_time change - mysql slow query limit - log-slow-queries= - mysql log long queries - set mysql - change long query time - log-slow-queries - max time value in sql - mysql set query - setting log-slow-queries for mysql - log-slow-queries mysql - mysql kill long queries - setting long_query_time in MYSQL - long time query - max query time mysql - problem with long queries in mysql -