更改 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)

发表评论

电子邮件地址不会被公开。 必填项已用*标注