Note
This view is introduced since OceanBase Database V1.4.
Purpose
The GV$SESSTAT view displays the session-level statistical events on all OBserver nodes.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| SID | bigint(20) | NO | For V4.3.x:
|
| CON_ID | bigint(20) | NO | The ID of the tenant. |
| SVR_IP | varchar(46) | NO | The IP address of the OBServer node where the information is stored. |
| SVR_PORT | bigint(20) | NO | The port number of the OBServer node where the information is stored. |
| STATISTICS# | bigint(20) | NO | The subscript of the statistical event. |
| VALUE | bigint(20) | NO | The number of times that the statistical event has happened. |
Sample query
Query session-level statistical event information for all OBServer nodes.
obclient [oceanbase]> SELECT * FROM oceanbase.GV$SESSTAT LIMIT 1\G
The query result is as follows:
*************************** 1. row ***************************
SID: 3221696264
CON_ID: 1
SVR_IP: xx.xx.xx.xx
SVR_PORT: 2882
STATISTIC#: 0
VALUE: 0