当我在 MySQL 数据库中运行 SHOW PROCESSLIST 时,我得到以下输出:
mysql> show full processlist;
+--------+------+-----------+--------+---------+-------+-------+-----------------------+
| Id | User | Host | db | Command | Time | State | Info |
+--------+------+-----------+-------+---------+-------+-------+-----------------------+
| 411665 | root | localhost | somedb | Sleep | 11388 | | NULL |
| 412109 | root | localhost | somedb | Query | 0 | NULL | show full processlist |
+--------+------+-----------+-------+---------+-------+-------+------------------------+
我想知道命令下的进程“睡眠”。这是什么意思?为什么它运行了很长时间并显示为NULL?它使数据库变慢,当我终止进程时,它可以正常工作。请帮我。