Think before you speak, read before you think.

更改 mysql 慢查询时间阈值

默认是 10s ,改为 200ms

mysql> show global variables like 'long_query_time%';
+-----------------+-----------+
| Variable_name   | Value     |
+-----------------+-----------+
| long_query_time | 10.000000 |
+-----------------+-----------+
1 row in set (0.01 sec)

mysql> set global long_query_time=0.2;
Query OK, 0 rows affected (0.01 sec)

mysql> show global variables like 'long_query_time%';
+-----------------+----------+
| Variable_name   | Value    |
+-----------------+----------+
| long_query_time | 0.200000 |
+-----------------+----------+
1 row in set (0.00 sec)

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *