Note
This view is available starting with V1.4.
Purpose
The V$STATNAME view displays the definitions of all statistics events.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| CON_ID | bigint(20) | NO | The ID of the tenant. |
| STAT_ID | bigint(20) | NO | The ID of the statistics event. |
| STATISTICS# | bigint(20) | NO | The index of the statistics event. |
| NAME | varchar(64) | NO | The name of the statistics event. |
| DISPLAY_NAME | varchar(64) | NO | The alias of the statistics event. |
| CLASS | bigint(20) | NO | The category of the statistics item. Each statistics item can be one of the following types:
|
Sample query
Query the definitions of all statistics events and display the first 10 records.
obclient [oceanbase]> SELECT * FROM oceanbase.V$STATNAME limit 10;
The query result is as follows:
+--------+---------+------------+-----------------------+-----------------------+-------+
| CON_ID | STAT_ID | STATISTIC# | NAME | DISPLAY_NAME | CLASS |
+--------+---------+------------+-----------------------+-----------------------+-------+
| 1 | 10000 | 0 | rpc packet in | rpc packet in | 1 |
| 1 | 10001 | 1 | rpc packet in bytes | rpc packet in bytes | 1 |
| 1 | 10002 | 2 | rpc packet out | rpc packet out | 1 |
| 1 | 10003 | 3 | rpc packet out bytes | rpc packet out bytes | 1 |
| 1 | 10004 | 4 | rpc deliver fail | rpc deliver fail | 1 |
| 1 | 10005 | 5 | rpc net delay | rpc net delay | 1 |
| 1 | 10006 | 6 | rpc net frame delay | rpc net frame delay | 1 |
| 1 | 10007 | 7 | mysql packet in | mysql packet in | 1 |
| 1 | 10008 | 8 | mysql packet in bytes | mysql packet in bytes | 1 |
| 1 | 10009 | 9 | mysql packet out | mysql packet out | 1 |
+--------+---------+------------+-----------------------+-----------------------+-------+
10 rows in set (0.008 sec)