Note
This view is available starting with V4.0.0.
Overview
The V$OB_PS_ITEM_INFO view is used to provide monitoring capabilities for prepared statements, containing basic information about all prepared statements in the PS cache.
Columns
Field |
Type |
Nullable |
Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | Tenant ID |
| SVR_IP | varchar(46) | NO | Server IP Address |
| SVR_PORT | bigint(20) | NO | Server Port Number |
| STMT_ID | bigint(20) | NO | stmt_id of the corresponding statement in the PS cache |
| DB_ID | bigint(20) | NO | Database ID Involved in the Prepare Statement |
| PS_SQL | longtext | NO | Prepare SQL Information |
| PARAM_COUNT | bigint(20) | NO | Number of parameters for PREPARE |
| STMT_ITEM_REF_COUNT | bigint(20) | NO | Reference count information of stmt_item |
| STMT_INFO_REF_COUNT | bigint(20) | NO | Reference count information of stmt_info |
| MEM_HOLD | bigint(20) | NO | The memory size occupied by the prepared statement |
| STMT_TYPE | bigint(20) | NO | Type information of the prepared statement |
| CHECKSUM | bigint(20) | NO | The checksum of the prepared statement. |
| EXPIRED | tinyint(4) | NO | Has this prepared statement expired? |
Sample query
View the basic information of all prepared statements in the PS cache, displaying the first record.
obclient [oceanbase]> SELECT * FROM oceanbase.V$OB_PS_ITEM_INFO LIMiT 1\G
The query result is as follows:
*************************** 1. row ***************************
TENANT_ID: 1002
SVR_IP: xx.xx.xx.xx
SVR_PORT: 28825
STMT_ID: 1
DB_ID: 201001
PS_SQL: select exists (select 1 from information_schema.tables where table_schema = 'oceanbase' and table_name = 'migrations' and table_type in ('BASE TABLE', 'SYSTEM VERSIONED')) as `exists`
PARAM_COUNT: 0
STMT_ITEM_REF_COUNT: 2
STMT_INFO_REF_COUNT: 2
MEM_HOLD: 1902
STMT_TYPE: 1
CHECKSUM: 306234872
EXPIRED: 0
1 row in set (0.047 sec)
