Note
This view is introduced since OceanBase Database V4.3.0.
Purpose
The CDB_OB_AUX_STATISTICS view displays the auxiliary statistics of all tenants.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | The tenant ID.
|
| LAST_ANALYZED | timestamp(6) | NO | The timestamp of the last statistics collection. |
| CPU_SPEED(MHZ) | bigint(20) | YES | The CPU frequency of the current environment, in MHz. |
| DISK_SEQ_READ_SPEED(MB/S) | bigint(20) | YES | The sequential read speed of the disk, in MB/s. |
| DISK_RND_READ_SPEED(MB/S) | bigint(20) | YES | The random read speed of the disk, in MB/s. |
| NETWORK_SPEED(MB/S) | bigint(20) | YES | The network transmission speed, in MB/s. |
Sample query
Manually enable auxiliary statistics collection:
obclient [oceanbase]> CALL dbms_stats.gather_system_stats();Query the auxiliary statistics of a tenant:
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_AUX_STATISTICS;The query result is as follows:
-------+----------------------------+----------------+---------------------------+---------------------------+---------------------+ | TENANT_ID | LAST_ANALYZED | CPU_SPEED(MHZ) | DISK_SEQ_READ_SPEED(MB/S) | DISK_RND_READ_SPEED(MB/S) | NETWORK_SPEED(MB/S) | +-----------+----------------------------+----------------+---------------------------+---------------------------+---------------------+ | 1 | 2024-03-14 11:36:55.196214 | 2500 | 3257 | 407 | 1250 | +-----------+----------------------------+----------------+---------------------------+---------------------------+---------------------+ 1 row in set (0.028 sec)