Overview
The V$STATNAME view displays the definitions for all statistical events.
Columns
Field |
Type |
Nullable |
Description |
|---|---|---|---|
| CON_ID | bigint(20) | NO | Tenant ID |
| STAT_ID | bigint(20) | NO | ID of the statistical event |
| STATISTICS# | bigint(20) | NO | Index of the statistical event |
| NAME | varchar(64) | NO | Name of the statistical event |
| DISPLAY_NAME | varchar(64) | NO | Statistic Event Alias |
| CLASS | bigint(20) | NO | Statistic category. Each statistic can belong to only one of these categories. ID:
|
Sample query
View the definitions of all statistical events for this tenant 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)