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ステートメントとクエリを実行するために10秒以上、または実行したquery_time含まれています。 This is the default value or query time threshold for log_slow_queries function, which is 10 seconds.これはデフォルトの値や、 10秒ですlog_slow_queries関数は、クエリの時間をきいています。 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.あなたは、 MySQLの設定ファイルで新しいlong_query_time 、すなわち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.上記のオプションを設定する、または長いクエリの制限は、 MySQLをキャプチャし、その実行するために5秒以上の長い時間がかかったし、ログファイルに実行しているすべての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 私のデジタルライフフォーラム . 。
Related Articles関連記事
- Enable Logging of Slow Queries (Slow Query Log) in MySQL Databaseスロークエリログを有効にする(スロークエリのログ)のMySQLのデータベース
- Change and Reset MySQL root Password MySQLのrootのパスワードを変更するとリセット
- You Are Not Authorized to Execute SQL Queries in vBulletin Maintenance SQLクエリを実行してvBulletinメンテナンスで許可されている
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 4 WebサーバーをインストールするWindows XPでのApache2 、 PHP5のとMySQL4 -パート4
- Reset the Root Password of MySQL Server MySQLサーバのrootのパスワードをリセット
- How to Read MySQL Binary Log Files (BinLog) with mysqlbinlog mysqlbinlogをどのようにMySQLのバイナリログファイル(をbinlog )を読むには
- How to Move WordPress Blog to New Domain or Locationどのように新しいドメインまたは場所にワードプレスのブログを移動する
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 3 WebサーバーはFreeBSD 6.0のインストールにより、 Apache 2.2 、 MySQLは5.0とPHP 5 -パート3
- Fix for Munin MySQL Monitoring Plugin Graph Not Showing or Blank Munin MySQLの監視のためのプラグインを修正しない、または空白のグラフ表示
- How to Find and Replace Text in MySQL Database using SQLどのようにしてMySQLデータベースにSQLを使用してテキストを置換して下さい

































June 20th, 2007 00:43 2007年6月、第20回2007/07/14 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.は、 " 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秒かかる。