mysql> show processlist;
show processlist;
+-----+------+-----------+---------+---------+-------+-------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-----+------+-----------+---------+---------+-------+-------+------------------+
| 657 | prog | localhost | weather | Sleep | 28619 | | NULL |
| 782 | prog | localhost | weather | connected| 853 | | NULL |
| 785 | prog | localhost | NULL | Query | 0 | NULL | show processlist |
+-----+------+-----------+---------+---------+-------+-------+------------------+
3 rows in set (0.00 sec) 请问下:
Command 栏中sleep, connect ,query到底表示什么意思,我要求准备的概念阐述,最好能有到mysql官方的解释链接?
show processlist;
+-----+------+-----------+---------+---------+-------+-------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-----+------+-----------+---------+---------+-------+-------+------------------+
| 657 | prog | localhost | weather | Sleep | 28619 | | NULL |
| 782 | prog | localhost | weather | connected| 853 | | NULL |
| 785 | prog | localhost | NULL | Query | 0 | NULL | show processlist |
+-----+------+-----------+---------+---------+-------+-------+------------------+
3 rows in set (0.00 sec) 请问下:
Command 栏中sleep, connect ,query到底表示什么意思,我要求准备的概念阐述,最好能有到mysql官方的解释链接?
http://mysqld.active-venture.com/SHOW_PROCESSLIST.html
http://dev.mysql.com/doc/refman/4.1/en/show-processlist.html
Command The value of that column corresponds to the COM_xxx commands of the client/server protocol. See Section 5.2.4, “Status Variables” The Command value may be one of the following: Binlog Dump, Change user, Close stmt, Connect, Connect Out, Create DB, Daemon, Debug, Delayed insert, Drop DB, Error, Execute, Fetch, Field List, Init DB, Kill, Long Data, Ping, Prepare, Processlist, Query, Quit, Refresh, Register Slave, Reset stmt, Set option, Shutdown, Sleep, Statistics, Table Dump, Time
不过,没给出各个command的说明,特别是Connect, 有点遗憾