Change or Set MySQL Long Query Time Value for log-slow-queries更改或設置MySQL的長查詢時間價值為日誌慢查詢

If you如果您 enable slow queries log of MySQL database server使緩慢查詢日誌中的MySQL數據庫服務器 , you will notice that from the slow query log file contains only SQL statements and queries that took more than query_time of 10 seconds to execute or run. ,你會發現,從慢查詢日誌文件只包含SQL語句,並查詢了超過query_time 10秒執行或執行。 This is the default value or query time threshold for log_slow_queries function, which is 10 seconds.這是默認值或查詢時間門檻log_slow_queries功能,這是10秒鐘。 10 seconds is way too long for a SQL query to complete, so the value may be too high to capture any meaningful data. 10秒的方式是太長SQL查詢來完成,所以價值可能過高,以捕獲任何有意義的數據。 You can alter or change the slow query time to lower value or number of seconds.你可以改變或改變緩慢,查詢時間,較低的價值或數量秒。

You can set a new long_query_time in the MySQL configuration file, namely my.cnf or my.ini, normally located in /etc directory.您可以設置一個新的long_query_time在MySQL配置文件,即my.cnf或my.ini ,通常位於/ etc目錄。 Simply add the following line to the configuration file:只需添加以下行的配置文件:

long_query_time = 5 long_query_time = 5

Above option will set the slow or long query limit as 5 seconds, which means MySQL will capture and log all SQL queries that took longer than 5 seconds to execute and finish running to the log file.最重要的選擇將緩慢或長期的查詢限制的5秒,這意味著MySQL的將捕捉和記錄所有的SQL查詢,長於5秒執行和完成運行日誌文件。

IMPORTANT : This is a machine translated page which is provided "as is" without warranty. 重要說明:這是一台機器翻譯網頁這是“原樣”提供,無保修。 Machine translation may be difficult to understand.機器翻譯可能很難理解。 Please refer to請參閱 original English article英文原文的文章 whenever possible.只要有可能。

Share and contribute or get technical support and help at共享和貢獻或獲得技術支持和幫助 My Digital Life Forums 我的數字生活論壇 .



One Response to “Change or Set MySQL Long Query Time Value for log-slow-queries”一個響應的“更改或設置MySQL的長查詢時間價值為日誌慢查詢”

  1. Todd托德
    June 20th, 2007 00:43 07年6月20日0點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.指出, “ 10秒的方式是太長SQL查詢來完成”略有不負責任的,作為10秒可能是完全合理的一些查詢,以完成特定的數據和硬件受到質疑反對合併的複雜性查詢。

    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.如何看這個網頁是排名相當高的人具有的性能問題與MySQL ,我覺得重要的是要設定這個連勝。 One should not read this article and assume that their queries are performing unreasonably slow simply because they take over 10 seconds.我們不應該閱讀此文章,並承擔其查詢的效能不合理緩慢僅僅是因為他們採取了10秒。

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> 您可以使用這些標籤: href="" title="">的<a <abbr title=""> <acronym title="">的<b> <blockquote cite=""> <cite>的<code> “刪除日期時間= “ ” “的<em> <i> <q cite=""> <strike>的<strong>

Subscribe to comments feature has been disabled. 訂閱評論功能已被禁用。 To receive notification of latest comments posted, subscribe to 收到通知的最新評論張貼,訂閱 My Digital Life Comments RSS feed 我國數字化生活的評論RSS種子 or register to receive 接收登記 new comments in daily email digest. 中新評論的電子郵件,每天消化。
Custom Search

New Articles新文章

Incoming Search Terms for the Article收到的搜索字詞的文章

log-slow-queries 登錄緩慢查詢 - - mysql long query time 數據庫查詢時間長 - - mysql long_query_time 數據庫long_query_time - - mysql long queries MySQL的長期查詢 - - mysql max query time MySQL的最大查詢時間 - - long-query-time mysql 長期的查詢時數據庫 - - how to log query time in mysql 如何記錄查詢時MySQL中 - - mysql limit query time 數據庫查詢的時間限制 - - mysql long query MySQL的長期查詢 - - long query time 查詢時間長 - - mysql long_query_time 數據庫long_query_time - - MYSQL SET LOG-SLOW-QUERIES 合租一套記錄慢查詢 - - long query log 長期查詢日誌 - - mysql long running queries MySQL的長期運行的查詢 - - mysql set long_query_time 數據庫設置long_query_time - - mysql change slow query time MySQL變更緩慢查詢時間 - - log-slow-queries 5 seconds 登錄慢5秒查詢 - - max query time mysql 最大數據庫的查詢時間 - - mysql query "time limit" 數據庫查詢“時間限制” - - mysql query limits MySQL查詢限制 - - mysql "query time limit" 數據庫“查詢時間限制” - - mysql set time limit MySQL的設定時限 - - vista mysql slow 維斯塔數據庫緩慢 - - "long query time" “長查詢時間” - - change query slow 查詢緩慢變化 - - how to set limit to mysql query 如何設置限制MySQL查詢 - - limit query time mysql 限制時間查詢數據庫 - - mysql freebsd log-slow-queries 數據庫的FreeBSD登錄慢查詢 - - mysql slow query max 數據庫查詢最大緩慢 - - mysql query time limit MySQL查詢時限 - - mysql time limit query 數據庫查詢時限 - - mysql long quesry time MySQL的長期quesry時間 - - mysql query limit max MySQL查詢限制最高 - - mysql long running queries MySQL的長期運行的查詢 - - mySQL takes a long time to do a query MySQL的需要很長的時間做查詢 - - slow query time limit 緩慢的查詢時限 - - access query between Time Value() 進入查詢之間的時間價值( ) - - limit mysql query time 限制MySQL查詢時間 - - mysql changing slow query time MySQL的變化緩慢的查詢時間 - - mysql slow query time 數據庫查詢時間緩慢 - - mysql log slow queries time option 數據庫查詢記錄的時間緩慢的選擇 - - mysql long time query MySQL的很長一段時間查詢 - - mysql activate slow queries MySQL的啟動緩慢查詢 - - set log slow queries 設置慢查詢日誌 - - slow log long query 長期緩慢登錄查詢 - - wordpress mysql slow queries WordPress的數據庫查詢緩慢 - - "max query time" “最大的查詢時間” - - enable slow query logs mysql windows 使緩慢查詢日誌數據庫窗口 - - how to change slow-query-time 如何改變緩慢的查詢時間 - - mysql long running MySQL的長期運行 - -