Note
This view is introduced since OceanBase Database V1.4.
Purpose
This view displays information about threads that are being executed.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| ID | bigint(20) unsigned | NO | The connection identifier. |
| USER | varchar(32) | NO | The username. |
| HOST | varchar(128) | NO | The hostname of the client. |
| DB | varchar(128) | YES | The name of the database. |
| COMMAND | varchar(4096) | NO | The type of the command being executed by the thread. |
| TIME | bigint(20) | NO | The time that the thread has been in its current state, in seconds. |
| STATE | varchar(128) | YES | The ID of the task that the thread is performing. |
| INFO | varchar(262143) | YES | The statement being executed by the thread. |
Sample query
Query information about threads that are being executed in the user tenant.
obclient [oceanbase]> SELECT * FROM information_schema.PROCESSLIST;
The query result is as follows:
+------------+------+----------------------+-----------+---------+------+--------+----------------------------------------------+
| ID | USER | HOST | DB | COMMAND | TIME | STATE | INFO |
+------------+------+----------------------+-----------+---------+------+--------+----------------------------------------------+
| 3221741020 | root | 100.xx.xxx.xxx:13803 | NULL | Sleep | 864 | SLEEP | NULL |
| 3221633480 | SYS | 100.xx.xxx.xxx:59160 | SYS | Sleep | 1150 | SLEEP | NULL |
| 3221660128 | root | 100.xx.xxx.xxx:44492 | oceanbase | Sleep | 55 | SLEEP | NULL |
| 3221688871 | root | 100.xx.xxx.xxx:49218 | infotest | Query | 0 | ACTIVE | SELECT * FROM information_schema.PROCESSLIST |
+------------+------+----------------------+-----------+---------+------+--------+----------------------------------------------+
4 rows in set
References
Query session information of all OBServer nodes where the tenant resides: GV$OB_PROCESSLIST