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 V$OB_PL_CACHE_OBJECT view displays basic information about PL-related cache objects in the current server for the current tenant.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | Tenant ID:
|
| SVR_IP | varchar(46) | NO | IP address of the node where the cache object is located |
| SVR_PORT | bigint(20) | NO | Port number of the node where the cache object is located |
| CACHE_OBJECT_ID | bigint(20) | NO | ID of the cache object allocated by lib cache |
| PARAMETERIZE_TEXT | longtext | NO |
|
| OBJECT_TEXT | longtext | NO | Text of the query statement. This column is valid only for anonymous blocks and CALL statements in PS mode. |
| FIRST_LOAD_TIME | timestamp(6) | NO | Time when the cache object was first loaded, in microseconds |
| LAST_ACTIVE_TIME | timestamp(6) | NO | Time of the last cache hit, in microseconds |
| AVG_EXE_USEC | bigint(20) | NO | Average execution time, in microseconds |
| SLOWEST_EXE_TIME | timestamp(6) | NO | Timestamp of the slowest execution, in microseconds |
| SLOWEST_EXE_USEC | bigint(20) | NO | Time consumed by the slowest execution, in microseconds |
| HIT_COUNT | bigint(20) | NO | Number of cache hits |
| CACHE_OBJ_SIZE | bigint(20) | NO | Size of the cache object in memory |
| EXECUTIONS | bigint(20) | NO | Number of successful executions of the stored procedure |
| ELAPSED_TIME | bigint(20) unsigned | NO | Time consumed by the last execution of the stored procedure, in microseconds |
| OBJECT_TYPE | longtext | NO | Type of the cache object (such as Procedure, Function, and Trigger) |
| OBJECT_ID | bigint(20) unsigned | NO | ID of the stored procedure object (routine_id/package_id) |
| COMPILE_TIME | bigint(20) unsigned | NO | Time consumed by the compilation of the stored procedure, in microseconds |
| SCHEMA_VERSION | bigint(20) | NO | Schema version number |
| PS_STMT_ID | bigint(20) | NO | Prepare ID corresponding to the request:
|
| DB_ID | bigint(20) unsigned | NO | ID of the database used for the compilation of the stored procedure
Note |
| PL_CG_MEM_HOLD | bigint(20) | NO | Memory held during the PL CG stage
Note |
| SYS_VARS | varchar(4096) | NO | System variables that affect plan generation in the current session
Note |
| PARAM_INFOS | longtext | NO | Type information of the parameterized anonymous block and call proc
Note |
| SQL_ID | varchar(32) | NO | Unique ID generated by using the MD5 value of the combination of the database name and routine name
Note |
| OUTLINE_VERSION | bigint(20) | NO | Version of the throttling outline. The default value is 0
Note |
| OUTLINE_ID | bigint(20) | NO | 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 about PL cache objects in the current server in the current tenant.
obclient > SELECT * FROM oceanbase.V$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:16:00.178506
AVG_EXE_USEC: 0
SLOWEST_EXE_TIME: 1970-01-01 08:00:00.000000
SLOWEST_EXE_USEC: 0
HIT_COUNT: 487
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)