Overview
The GV$OB_PL_CACHE_OBJECT view displays basic information about PL-related cache objects on all servers in the current tenant.
Columns
Column |
Type |
Is NULL |
Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | Tenant ID:
|
| SVR_IP | varchar(46) | NO | Node address where the cached object is located |
| SVR_PORT | bigint(20) | NO | Port of the node where the cache object resides |
| CACHE_OBJECT_ID | bigint(20) | NO | Cache object ID allocated by libcache |
| PARAMETERIZE_TEXT | longtext | NO |
|
| OBJECT_TEXT | longtext | NO | Query statement text. This field is valid only in anonymous blocks and CALL statements in PS mode. |
| FIRST_LOAD_TIME | timestamp(6) | NO | Time taken for the first load, in microseconds |
| LAST_ACTIVE_TIME | timestamp(6) | NO | Last Cache Hit Time, in microseconds |
| AVG_EXE_USEC | bigint(20) | NO | Average execution time, in microseconds |
| SLOWEST_EXE_TIME | timestamp(6) | NO | Slowest execution timestamp, in microseconds |
| SLOWEST_EXE_USEC | bigint(20) | NO | Time consumed in the most recent slow execution, in microseconds |
| HIT_COUNT | bigint(20) | NO | Cache Hits |
| CACHE_OBJ_SIZE | bigint(20) | NO | Memory Size Occupied by Cache Objects |
| EXECUTIONS | bigint(20) | NO | Number of Successful Stored Procedure Executions |
| ELAPSED_TIME | bigint(20) unsigned | NO | Time taken by the last stored procedure execution, in microseconds |
| OBJECT_TYPE | longtext | NO | Cache object type (for example, Procedure, Function, Trigger, etc.) |
| OBJECT_ID | bigint(20) unsigned | NO | The object ID of the stored procedure. routine_id/package_id) |
| COMPILE_TIME | bigint(20) unsigned | NO | Stored procedure compilation time, in microseconds |
| SCHEMA_VERSION | bigint(20) | NO | Schema version number |
| PS_STMT_ID | bigint(20) | NO | The prepare ID corresponding to the request:
|
| DB_ID | bigint(20) unsigned | NO | The database ID used during the compilation of the stored procedure. |
| PL_CG_MEM_HOLD | bigint(20) | NO | Memory Held During PLCG Phase |
| SYS_VARS | varchar(4096) | NO | Displays system variables that affect plan generation in the current session. |
| PARAM_INFOS | longtext | NO | Displays the parameterized type information for anonymous blocks and call proc info |
| SQL_ID | varchar(32) | NO | Unique ID generated by the MD5 hash of db_name+routine_name |
| OUTLINE_VERSION | bigint(20) | NO | The version of the throttling outline. Default value: 0 |
| OUTLINE_ID | bigint(20) | NO | The ID of the throttling outline, which is by default. -1 |
| CONCURRENT_DATA | longtext | NO | Throttling content, default is /*+max_concurrent(-1)*/, -1 Indicates that throttling is not performed. |
| CG_TIME | bigint(20) unsigned | NO | Time Spent on Code Generation During PL Compilation |
Sample query
Query the basic information of PL-related cache objects on all servers in the current tenant.
obclient > SELECT * FROM oceanbase.GV$OB_PL_CACHE_OBJECT limit 1 \G
The query result is as follows:
*************************** 1. row ***************************
TENANT_ID: 1002
SVR_IP: 172.xx.xx.xx
SVR_PORT: 2882
CACHE_OBJECT_ID: 330
PARAMETERIZE_TEXT: oceanbase.dbms_stats
OBJECT_TEXT: NULL
FIRST_LOAD_TIME: 2025-07-30 16:46:00.213850
LAST_ACTIVE_TIME: 2025-08-04 16:46:00.176466
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: 28200
SCHEMA_VERSION: 1753864082932160
PL_EVICT_VERSION: 1753864474060696
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.007 sec)