SHOW QUERIES
SHOW QUERIES
returns information about all currently running queries. The output is a table with the following structure:
id
: Query ID that can be used in KILL to terminate the queryquery
: Query statement or a portion of itprotocol
: Connection protocol, with possible values being sphinx
, mysql
, http
, ssl
, compressed
, replication
, or a combination (e.g., http,ssl
or compressed,mysql
)host
: Client’s ip:port
> SHOW QUERIES; mysql
+------+--------------+----------+-----------------+
| id | query | protocol | host |
+--------------------------+-----------------------+
| 6 | select | http | 127.0.0.1:41128 |
| 4 | show queries | mysql | 127.0.0.1:56672 |
+------+--------------+----------+-----------------+
2 rows in set (0.61 sec)
Refer to SHOW THREADS if you’d like to gain insight from the perspective of the threads themselves.