# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection id is 280009
Server version: 5.7.44-log Source distribution
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MySQL [(none)]> SHOW GLOBAL VARIABLES LIKE 'long_query_time';
+-----------------+----------+
| Variable_name | Value |
+-----------------+----------+
| long_query_time | 1.000000 |
+-----------------+----------+
1 row in set (0.001 sec)
long_query_time = 1
但实际上0.000563秒的这种查询都会大量显示出来,造成慢查询日志中的数据太多,而很难捕捉到真正有问题的慢查询。
- <blockquote>SHOW COLUMNS FROM `mysqlactor`;
复制代码 SHOW COLUMNS FROM `mysqlactor`;
# Time: 2025-06-13T09:19:09.370701Z
# User@Host: www_baidu_com[www_baidu_com] @ localhost [127.0.0.1] Id: 275023
# Query_time: 0.000563 Lock_time: 0.000094 Rows_sent: 82 Rows_examined: 82
SET timestamp=1749806349;
SHOW COLUMNS FROM `mysqlvod`;
# Time: 2025-06-13T09:19:09.405967Z
# User@Host: www_baidu_com[www_baidu_com] @ localhost [127.0.0.1] Id: 275023
# Query_time: 0.000370 Lock_time: 0.000073 Rows_sent: 42 Rows_examined: 42
SET timestamp=1749806349;
SHOW COLUMNS FROM `mysqlactor`;
# Time: 2025-06-13T09:19:09.987803Z
# User@Host: www_baidu_com[www_baidu_com] @ localhost [127.0.0.1] Id: 275031
# Query_time: 0.000431 Lock_time: 0.000072 Rows_sent: 82 Rows_examined: 82
SET timestamp=1749806349;
SHOW COLUMNS FROM `mysqlvod`;
# Time: 2025-06-13T09:19:10.014046Z
|
|