Note
This view is introduced since OceanBase Database V4.2.2.
Purpose
The GV$OB_PL_CACHE_OBJECT view displays the basic information about cached PL objects of all tenants.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | No | The ID of the tenant. Valid values:
|
| SVR_IP | varchar(46) | No | The IP address of the server where the cached object is located. |
| SVR_PORT | bigint(20) | No | The port number of the server where the cached object is located. |
| CACHE_OBJECT_ID | bigint(20) | No | The ID allocated to the cached object by lib cache. |
| PARAMETERIZE_TEXT | longtext | No |
|
| OBJECT_TEXT | longtext | No | The text of the query statement. This field takes effect only on an anonymous block or a CALL statement in PS mode. |
| FIRST_LOAD_TIME | timestamp(6) | No | The duration for loading the cached objects for the first time, in μs. |
| LAST_ACTIVE_TIME | timestamp(6) | No | The timestamp, accurate to μs, when the cached object was last hit. |
| AVG_EXE_USEC | bigint(20) | No | The average execution duration, in μs. |
| SLOWEST_EXE_TIME | timestamp(6) | No | The timestamp, accurate to μs, when the execution of the slowest statement started. |
| SLOWEST_EXE_USEC | bigint(20) | No | The time consumed by the slowest execution, in μs. |
| HIT_COUNT | bigint(20) | No | The number of cache hits. |
| CACHE_OBJ_SIZE | bigint(20) | No | The size of memory occupied by cached objects. |
| EXECUTIONS | bigint(20) | No | The number of successful executions of the stored procedure. |
| ELAPSED_TIME | bigint(20) unsigned | No | The execution time of the last executed stored procedure, in us. |
| OBJECT_TYPE | longtext | No | The type of the cached object, such as a procedure, function, and trigger. |
| OBJECT_ID | bigint(20) unsigned | No | The ID of the object, such as routine_id or package_id. |
| COMPILE_TIME | bigint(20) unsigned | No | The time consumed for compiling the stored procedure, in μs. |
| SCHEMA_VERSION | bigint(20) | No | The version of the schema. |
| PS_STMT_ID | bigint(20) | No | The ID of the prepared statement corresponding to the request.
|
Example
obclient > SELECT * FROM oceanbase.GV$OB_PL_CACHE_OBJECT\G;
The query result is as follows:
*************************** 1. row ***************************
TENANT_ID: 1
SVR_IP: xx.xx.xx.xx
SVR_PORT: 2882
CACHE_OBJECT_ID: 1273
PARAMETERIZE_TEXT: STANDARD
OBJECT_TEXT: NULL
FIRST_LOAD_TIME: 2023-12-08 13:59:02.360905
LAST_ACTIVE_TIME: 2023-12-08 13:59:09.335255
AVG_EXE_USEC: 0
SLOWEST_EXE_TIME: 1970-01-01 08:00:00.000000
SLOWEST_EXE_USEC: 0
HIT_COUNT: 54
CACHE_OBJ_SIZE: 23808
EXECUTIONS: 0
ELAPSED_TIME: 0
OBJECT_TYPE: PACKAGE
OBJECT_ID: 310001
COMPILE_TIME: 13649
SCHEMA_VERSION: 1702015142315728
PS_STMT_ID: -1