Note
This view is introduced since OceanBase Database V4.2.2.
Purpose
The V$STATNAME view displays the statistical items.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| CON_ID | NUMBER | NO | The ID of the tenant. |
| STAT_ID | NUMBER | NO | The ID of the statistical item. |
| STATISTIC# | NUMBER | NO | The sequence number of the statistical item. |
| NAME | VARCHAR2(64) | NO | The name of the statistical item. |
| DISPLAY_NAME | VARCHAR2(64) | NO | The name of the statistical item. |
| CLASS | NUMBER | NO | The name of the class to which the statistical item belongs. A statistical item can belong to only one class.
- 1: NETWORK
- 2: QUEUE
- 4: TRANS
- 8: SQL
- 16: CACHE
- 32: STORAGE
- 64: RESOURCE
- 128: DEBUG
- 256: CLOG
- 512: ELECT
- 1024: OBSERVER
- 2048: RS
- 3072: SYS
- 4096: TABLEAPI
- 8192: WR
Sample query
obclient [SYS]> SELECT * FROM SYS.V$STATNAME WHERE ROWNUM = 1;
The query result is as follows:
+--------+---------+------------+---------------+---------------+-------+
| CON_ID | STAT_ID | STATISTIC# | NAME | DISPLAY_NAME | CLASS |
+--------+---------+------------+---------------+---------------+-------+
| 1004 | 10000 | 0 | rpc packet in | rpc packet in | 1 |
+--------+---------+------------+---------------+---------------+-------+
1 row in set
