Inspects active connections and running SQL statements in PolarDB-X 1.0. Use SHOW PROCESSLIST to view the logical-layer connections on the PolarDB-X engine, and SHOW PHYSICAL_PROCESSLIST to drill into the physical SQL running on the underlying storage nodes.
SHOW PROCESSLIST
Returns one row per active connection to the PolarDB-X 1.0 instance, showing the SQL statement currently being executed.
Syntax
SHOW PROCESSLISTExample
mysql> SHOW PROCESSLIST\G
ID: 1971050
USER: admin
HOST: 111.111.111.111:4303
DB: drds_test
COMMAND: Query
TIME: 0
STATE:
INFO: show processlist
1 row in set (0.01 sec)Output fields
| Field | Description |
|---|---|
ID | Connection ID. The value is a long-type number. |
USER | Username used to establish the connection. |
HOST | IP address and port number of the connecting host. |
DB | Name of the database accessed by the connection. |
COMMAND | Connection state: Query (an SQL statement is executing) or Sleep (the connection is idle). |
TIME | Duration of the current state, in seconds. If COMMAND is Query, this is how long the statement has been running. If COMMAND is Sleep, this is how long the connection has been idle. |
STATE | Always empty. |
INFO | If COMMAND is Query, the SQL statement being executed. If COMMAND is Sleep, this field is empty. Without FULL, truncated to the first 30 characters. With FULL, truncated to the first 1,000 characters. |
SHOW PHYSICAL_PROCESSLIST
Returns information about physical SQL statements running on the underlying storage nodes. Use this when you need to see how a logical query is executed at the physical layer.
Syntax
SHOW PHYSICAL_PROCESSLISTWhen a returned SQL statement is excessively long, it is truncated. Run SHOW FULL PHYSICAL_PROCESSLIST to retrieve the complete statement.Example
mysql> SHOW PHYSICAL_PROCESSLIST\G
*************************** 1. row ***************************
ID: 0-0-521414
USER: tddl5
DB: tddl5_00
COMMAND: Query
TIME: 0
STATE: init
INFO: show processlist
*************************** 2. row ***************************
ID: 0-0-521570
USER: tddl5
DB: tddl5_00
COMMAND: Query
TIME: 0
STATE: User sleep
INFO: /*DRDS /88.88.88.88/b67a0e4d8800000/ */ select sleep(1000)
2 rows in set (0.01 sec)The column meanings match those of SHOW PROCESSLIST in MySQL. For details, see SHOW PROCESSLIST syntax.
Usage notes
STATE is always empty in SHOW PROCESSLIST. This field is meaningless and carries no information.
The ID column type differs from ApsaraDB RDS for MySQL. In
SHOW PHYSICAL_PROCESSLIST, PolarDB-X 1.0 returns a string (for example,0-0-521414) in theIDcolumn rather than a number.