Note
This view is available starting with V4.4.1.
Purpose
The CDB_OB_SS_SPACE_USAGE view records the storage space usage on object storage for each tenant.
Note
This view is applicable only to the Shared-Storage (SS) mode. In the Shared-Nothing (SN) mode, the query result of this view is empty.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | The tenant ID. |
| TENANT_NAME | varchar(128) | NO | The tenant name. |
| ENDPOINT | varchar(128) | NO | The endpoint of the shared storage. |
| PATH | varchar(128) | NO | The path of the shared storage. |
| STORAGE_TYPE | varchar(32) | NO | The storage type. Valid values:
|
| VALUE | bigint(20) | NO | The storage space occupied by the STORAGE_TYPE value, in bytes. |
Sample query
In the Shared-Storage mode, query the storage space usage on object storage for each tenant.
obclient(root@sys)[oceanbase]> SELECT * FROM oceanbase.CDB_OB_SS_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