All Products
Search
Document Center

PolarDB:SHOW PROCESSLIST

Last Updated:Mar 28, 2026

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 PROCESSLIST

Example

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

FieldDescription
IDConnection ID. The value is a long-type number.
USERUsername used to establish the connection.
HOSTIP address and port number of the connecting host.
DBName of the database accessed by the connection.
COMMANDConnection state: Query (an SQL statement is executing) or Sleep (the connection is idle).
TIMEDuration 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.
STATEAlways empty.
INFOIf 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_PROCESSLIST
When 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 the ID column rather than a number.