Note
For V4.3.5, this view is introduced in V4.3.5 BP2.
Purpose
This view displays the overall cache usage of all tenants on all OBServer nodes.
Note
This view applies only to Shared-Storage (SS) mode. In Shared-Nothing (SN) mode, the query result of this view is empty.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| SVR_IP | varchar(46) | NO | The IP address of the OBServer node. |
| SVR_PORT | bigint(20) | NO | The port number of the OBServer node. |
| TENANT_ID | bigint(20) | NO | The ID of the tenant. |
| TABLET_ID | bigint(20) | NO | The ID of the tablet. |
| STORAGE_CACHE_POLICY | varchar(64) | NO | The cache status of the tablet:
|
| CACHED_DATA_SIZE | bigint(20) | NO | The amount of data cached locally for the tablet, in bytes. |
| CACHE_HIT_COUNT | bigint(20) | NO | The number of cache hits for the tablet. The value of this field is currently -1. |
| CACHE_MISS_COUNT | bigint(20) | NO | The number of cache misses for the tablet. The value of this field is currently -1. |
| CACHE_HIT_SIZE | bigint(20) | NO | The amount of data that hit the cache for the tablet, in bytes. The value of this field is currently -1. |
| CACHE_MISS_SIZE | bigint(20) | NO | The amount of data that missed the cache for the tablet, in bytes. The value of this field is currently -1. |
| INFO | varchar(4096) | NO | Other information. |
Sample query
In SS mode, query the overall cache usage of the tenant with ID 1002 on all OBServer nodes in the system tenant.
obclient> SELECT SVR_IP, SVR_POR, TENANT_ID, TABLET_ID, STORAGE_CACHE_POLICY, INFO FROM oceanbase.GV$OB_TABLET_LOCAL_CACHE WHERE TENANT_ID = 1002;
The query result is as follows:
+---------------+----------+-----------+-----------+----------------------+------+
| SVR_IP | SVR_PORT | TENANT_ID | TABLET_ID | STORAGE_CACHE_POLICY | INFO |
+---------------+----------+-----------+-----------+----------------------+------+
| 11.xx.xxx.166 | 16702 | 1002 | 200001 | AUTO | |
| 11.xx.xxx.166 | 16702 | 1002 | 200002 | AUTO | |
| 11.xx.xxx.166 | 16702 | 1002 | 200003 | AUTO | |
| 11.xx.xxx.166 | 16702 | 1002 | 200004 | AUTO | |
| 11.xx.xxx.166 | 16702 | 1002 | 200005 | AUTO | |
| 11.xx.xxx.166 | 16702 | 1002 | 200006 | AUTO | |
| 11.xx.xxx.166 | 16702 | 1002 | 200007 | AUTO | |
| 11.xx.xxx.166 | 16702 | 1002 | 200008 | AUTO | |
| 11.xx.xxx.166 | 16702 | 1002 | 200009 | AUTO | |
| 11.xx.xxx.166 | 16702 | 1002 | 200010 | AUTO | |
| 11.xx.xxx.166 | 16702 | 1002 | 200011 | AUTO | |
| 11.xx.xxx.166 | 16702 | 1002 | 200012 | AUTO | |
| 11.xx.xxx.166 | 16702 | 1002 | 200013 | AUTO | |
| 11.xx.xxx.166 | 16702 | 1002 | 200014 | AUTO | |
| 11.xx.xxx.166 | 16702 | 1002 | 200015 | AUTO | |
| 11.xx.xxx.166 | 16702 | 1002 | 200016 | AUTO | |
| 11.xx.xxx.166 | 16702 | 1002 | 200017 | AUTO | |
| 11.xx.xxx.166 | 16702 | 1002 | 200018 | AUTO | |
| 11.xx.xxx.166 | 16702 | 1002 | 200019 | AUTO | |
| 11.xx.xxx.166 | 16702 | 1002 | 200020 | AUTO | |
| 11.xx.xxx.167 | 16703 | 1002 | 200001 | AUTO | |
| 11.xx.xxx.167 | 16703 | 1002 | 200002 | AUTO | |
| 11.xx.xxx.167 | 16703 | 1002 | 200003 | AUTO | |
| 11.xx.xxx.167 | 16703 | 1002 | 200004 | AUTO | |
| 11.xx.xxx.167 | 16703 | 1002 | 200005 | AUTO | |
| 11.xx.xxx.167 | 16703 | 1002 | 200006 | AUTO | |
| 11.xx.xxx.167 | 16703 | 1002 | 200007 | AUTO | |
| 11.xx.xxx.167 | 16703 | 1002 | 200008 | AUTO | |
| 11.xx.xxx.167 | 16703 | 1002 | 200009 | AUTO | |
| 11.xx.xxx.167 | 16703 | 1002 | 200010 | AUTO | |
| 11.xx.xxx.167 | 16703 | 1002 | 200011 | AUTO | |
| 11.xx.xxx.167 | 16703 | 1002 | 200012 | AUTO | |
| 11.xx.xxx.167 | 16703 | 1002 | 200013 | AUTO | |
+---------------+----------+-----------+-----------+----------------------+------+
33 rows in set