Note
- This view is available starting with V4.3.1 in V4.3.x.
- This view is available starting with V4.2.2 in V4.2.x.
Purpose
The GV$OB_PL_CACHE_OBJECT view displays the basic information of PL-related cached objects in all servers of all tenants.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | Tenant ID:
|
| SVR_IP | varchar(46) | NO | The IP address of the node where the cache object resides. |
| SVR_PORT | bigint(20) | NO | The port of the node where the cache object resides. |
| CACHE_OBJECT_ID | bigint(20) | NO | The ID of the cache object allocated by the lib cache. |
| PARAMETERIZE_TEXT | longtext | NO |
|
| OBJECT_TEXT | longtext | NO | The text of the query statement. This field is valid only for anonymous blocks and CALL statements in the PS mode. |
| FIRST_LOAD_TIME | timestamp(6) | NO | The time when the cache object was first loaded, in microseconds. |
| LAST_ACTIVE_TIME | timestamp(6) | NO | The time of the last cache hit, in microseconds. |
| AVG_EXE_USEC | bigint(20) | NO | The average execution time, in microseconds. |
| SLOWEST_EXE_TIME | timestamp(6) | NO | The timestamp of the slowest execution, in microseconds. |
| SLOWEST_EXE_USEC | bigint(20) | NO | The duration of the slowest execution, in microseconds. |
| HIT_COUNT | bigint(20) | NO | The number of cache hits. |
| CACHE_OBJ_SIZE | bigint(20) | NO | The size of the cache object in memory. |
| EXECUTIONS | bigint(20) | NO | The number of successful executions of the stored procedure. |
| ELAPSED_TIME | bigint(20) unsigned | NO | The duration of the last execution of the stored procedure, in microseconds. |
| OBJECT_TYPE | longtext | NO | The type of the cache object, such as Procedure, Function, or Trigger. |
| OBJECT_ID | bigint(20) unsigned | NO | The ID of the stored procedure object (routine_id/package_id). |
| COMPILE_TIME | bigint(20) unsigned | NO | The compilation time of the stored procedure, in microseconds. |
| SCHEMA_VERSION | bigint(20) | NO | The schema version number. |
| PS_STMT_ID | bigint(20) | NO | The Prepare ID corresponding to the request:
|
| DB_ID | bigint(20) unsigned | NO | The ID of the database used to compile the stored procedure.
Note |
| PL_CG_MEM_HOLD | bigint(20) | NO | The memory held during the PL CG phase.
Note |
| SYS_VARS | varchar(4096) | NO | The system variables that affect plan generation in the current session.
Note |
| PARAM_INFOS | longtext | NO | The parameterized type information of anonymous blocks and call proc info.
Note |
| SQL_ID | varchar(32) | NO | The unique ID generated by using the MD5 value of db_name+routine_name.
Note |
| OUTLINE_VERSION | bigint(20) | NO | The version of the throttling outline. The default value is 0.
Note |
| OUTLINE_ID | bigint(20) | NO | The ID of the throttling outline. The default value is -1.
Note |
| CONCURRENT_DATA | longtext | NO | The throttling content, which defaults to /*+max_concurrent(-1)*/. -1 indicates no throttling.
Note |
Sample query
Query the basic information of all PL-related cache objects in all servers of all tenants.
obclient > SELECT * FROM oceanbase.GV$OB_PL_CACHE_OBJECT limit 1 \G
The query result is as follows:
*************************** 1. row ***************************
TENANT_ID: 1
SVR_IP: 172.xx.xx.xx
SVR_PORT: 2882
CACHE_OBJECT_ID: 1889
PARAMETERIZE_TEXT: oceanbase.dbms_stats
OBJECT_TEXT: NULL
FIRST_LOAD_TIME: 2025-07-30 16:43:01.654706
LAST_ACTIVE_TIME: 2025-08-04 16:43:01.631334
AVG_EXE_USEC: 0
SLOWEST_EXE_TIME: 1970-01-01 08:00:00.000000
SLOWEST_EXE_USEC: 0
HIT_COUNT: 490
CACHE_OBJ_SIZE: 23808
EXECUTIONS: 0
ELAPSED_TIME: 0
OBJECT_TYPE: PACKAGE
OBJECT_ID: 310001
COMPILE_TIME: 7556
SCHEMA_VERSION: 1753864082932160
PL_EVICT_VERSION: 1753864319705488
PS_STMT_ID: -1
DB_ID: 201001
PL_CG_MEM_HOLD: 0
SYS_VARS: 4,BYTE,17180131328,
PARAM_INFOS:
SQL_ID: 1D8E045F2078A97A55B844A07B66B17A
OUTLINE_VERSION: 0
OUTLINE_ID: -1
CONCURRENT_DATA: /*+max_concurrent(-1)*/
1 row in set (0.006 sec)
