Overview
The CDB_OB_STORAGE_SPACE_USAGE view is used to record the storage space usage of object storage for each tenant.
Columns
Field Name |
Type |
Whether can be NULL |
Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | Tenant ID. |
| TENANT_NAME | varchar(128) | NO | Tenant name. |
| ENDPOINT | varchar(128) | NO | Endpoint for shared storage. |
| PATH | varchar(128) | NO | The path of the shared storage. |
| STORAGE_TYPE | varchar(32) | NO | Storage type:
|
| VALUE | bigint(20) | NO | STORAGE_TYPE The corresponding space usage, in bytes. |
Sample query
View the storage space usage on the object storage of each tenant.
obclient(root@sys)[oceanbase]> SELECT * FROM oceanbase.CDB_OB_STORAGE_SPACE_USAGE;
The query result is as follows:
+-----------+-------------+----------+-------+-------------------+----------+
| TENANT_ID | TENANT_NAME | ENDPOINT | PATH | STORAGE_TYPE | VALUE |
+-----------+-------------+----------+-------+-------------------+----------+
| 1002 | oracle001 | UNUSE | UNUSE | Local All Bytes | 0 |
| 1002 | oracle001 | UNUSE | UNUSE | Shared Data Bytes | 14071279 |
| 1002 | oracle001 | UNUSE | UNUSE | Shared Meta Bytes | 6406144 |
| 1004 | mysql001 | UNUSE | UNUSE | Local All Bytes | 0 |
| 1004 | mysql001 | UNUSE | UNUSE | Shared Data Bytes | 22203985 |
| 1004 | mysql001 | UNUSE | UNUSE | Shared Meta Bytes | 6508544 |
+-----------+-------------+----------+-------+-------------------+----------+
6 rows in set