Note
This view is introduced since OceanBase Database V4.0.0.
Purpose
The GV$OB_KVCACHE view displays information about the KV cache on all OBServer nodes.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| SVR_IP | VARCHAR2(46) | NO | The IP address of the OBServer node. |
| SVR_PORT | NUMBER(38) | NO | The port number of the OBServer node. |
| TENANT_ID | NUMBER(38) | NO | The ID of the tenant. |
| CACHE_NAME | VARCHAR2(128) | NO | The name of the cache item. |
| PRIORITY | NUMBER(38) | NO | The priority. |
| CACHE_SIZE | NUMBER(38) | NO | The cache size. |
| HIT_RATIO | NUMBER(38,3) | NO | The hit rate. |
| TOTAL_PUT_CNT | NUMBER(38) | NO | The number of puts. |
| TOTAL_HIT_CNT | NUMBER(38) | NO | The number of hits. |
| TOTAL_MISS_CNT | NUMBER(38) | NO | The number of misses. |
Sample query
In the following example, information about the KV-cache is queried for each OBServer node in the same user tenant.
obclient [SYS]> SELECT * FROM SYS.GV$OB_KVCACHE;
The query result is as follows:
+----------------+----------+-----------+-----------------------+----------+------------+-----------+---------------+---------------+----------------+
| SVR_IP | SVR_PORT | TENANT_ID | CACHE_NAME | PRIORITY | CACHE_SIZE | HIT_RATIO | TOTAL_PUT_CNT | TOTAL_HIT_CNT | TOTAL_MISS_CNT |
+----------------+----------+-----------+-----------------------+----------+------------+-----------+---------------+---------------+----------------+
| 172.xx.xxx.xxx | 2882 | 1004 | index_block_cache | 10 | 74905600 | 99.533 | 19857 | 5233498 | 24581 |
| 172.xx.xxx.xxx | 2882 | 1004 | user_block_cache | 1 | 763639808 | 99.83 | 23839 | 23290839 | 39603 |
| 172.xx.xxx.xxx | 2882 | 1004 | user_row_cache | 1 | 6241280 | 51.808 | 1746 | 3711 | 3452 |
| 172.xx.xxx.xxx | 2882 | 1004 | fuse_row_cache | 1 | 8322048 | 99.78 | 871 | 793214 | 1751 |
| 172.xx.xxx.xxx | 2882 | 1004 | storage_meta_cache | 10 | 312110080 | 99.828 | 63515 | 36988250 | 63608 |
| 172.xx.xxx.xxx | 2882 | 1004 | tx_data_kv_cache | 2 | 6241280 | 100 | 1 | 84109 | 0 |
| 172.xx.xxx.xxx | 2882 | 1004 | log_kv_cache | 1 | 2621764608 | 0 | 38949 | 0 | 0 |
| 172.xx.xxx.xxx | 2882 | 1004 | opt_table_stat_cache | 1 | 6241280 | 76.594 | 235 | 11738 | 3587 |
| 172.xx.xxx.xxx | 2882 | 1004 | opt_column_stat_cache | 1 | 6241280 | 2.972 | 107 | 1161 | 37906 |
| 172.xx.xxx.xxx | 2882 | 1004 | opt_ds_stat_cache | 1 | 4160512 | 0 | 1 | 0 | 1 |
| 172.xx.xxx.xxx | 2882 | 1004 | opt_system_stat_cache | 1 | 6241280 | 100 | 2 | 4168 | 0 |
+----------------+----------+-----------+-----------------------+----------+------------+-----------+---------------+---------------+----------------+
11 rows in set