OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

Product Overview
DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

Product Overview
DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

OceanBase Database

SQL - V4.2.5

    Download PDF

    OceanBase logo

    The Unified Distributed Database for the AI Era.

    Follow Us
    Products
    OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
    Resources
    DocsBlogLive DemosTraining & CertificationTicket
    Company
    About OceanBaseTrust CenterLegalPartnerContact Us
    Follow Us

    © OceanBase 2026. All rights reserved

    Cloud Service AgreementPrivacy PolicySecurity
    Contact Us
    Document Feedback
    1. Documentation Center
    2. OceanBase Database
    3. SQL
    4. V4.2.5
    iconOceanBase Database
    SQL - V 4.2.5
    Databases
    • OceanBase Database
    • OceanBase Cloud
    • OceanBase Tugraph
    • Interactive Tutorials
    • OceanBase Best Practices
    Tools
    • OceanBase Cloud Platform
    • OceanBase Migration Service
    • OceanBase Developer Center
    • OceanBase Migration Assessment
    • OceanBase Admin Tool
    • OceanBase Loader and Dumper
    • OceanBase Deployer
    • Kubernetes operator for OceanBase
    • OceanBase Diagnostic Tool
    • OceanBase Binlog Service
    Connectors and Middleware
    • OceanBase Database Proxy
    • Embedded SQL in C for OceanBase
    • OceanBase Call Interface
    • OceanBase Connector/C
    • OceanBase Connector/J
    • OceanBase Connector/ODBC
    • OceanBase Connector/NET
    SQL
    KV
    • V 4.6.0
    • V 4.4.2
    • V 4.3.5
    • V 4.3.3
    • V 4.3.1
    • V 4.3.0
    • V 4.2.5
    • V 4.2.2
    • V 4.2.1
    • V 4.2.0
    • V 4.1.0
    • V 4.0.0
    • V 3.1.4 and earlier

    V$OB_SESSION_PS_INFO

    Last Updated:2026-04-27 03:14:13  Updated
    Share
    What is on this page
    Purpose
    Columns
    Sample query
    References

    folded

    Share

    Note

    This view was introduced in OceanBase Database V4.2.3.

    Purpose

    The V$OB_SESSION_PS_INFO view displays the information about prepared statements opened in all sessions on the current OBServer node.

    Columns

    Column
    Type
    Nullable?
    Description
    SVR_IP VARCHAR2(46) NO The IP address of the OBServer node.
    SVR_PORT NUMBER(38) NO The port number of the OBServer node.
    TENANT_ID NUMBER(38) NO The ID of the tenant.
    PROXY_SESSION_ID NUMBER(38) NO The session ID in OceanBase Database Proxy (ODP).
    SESSION_ID NUMBER(38) NO For V4.2.x:
    • V4.2.5 BP4 and earlier:
      In all connection modes (direct connection mode and ODP mode), this field indicates the server session ID.
    • V4.2.5 BP4 and later:
      • In ODP mode:
        • If the ODP parameter client_session_id_version = 2, this field indicates the client session ID.
        • If client_session_id_version = 1, this field indicates the server session ID.
    PS_CLIENT_STMT_ID NUMBER(38) NO The prepared statement ID returned to the client after the client sends a PREPARE request.
    PS_INNER_STMT_ID NUMBER(38) NO The internal prepared statement ID on the OBServer node, namely the prepared statement ID in the prepared statement cache.
    STMT_TYPE VARCHAR2(256) NO The type of the prepared statement. Here are some of the valid values: T_SELECT, T_INSERT, T_REPLACE, T_DELETE, T_UPDATE, T_MERGE, T_EXPLAIN, T_CREATE_TABLE, and T_DROP_TABLE.
    PARAM_COUNT NUMBER(38) NO The number of parameters in the prepared statement.
    PARAM_TYPES CLOB NO A list of parameter types. It contains the types of all parameters in the prepared statement. Each parameter type is represented by a number. Different parameter types are separated with commas (,).
    REF_COUNT NUMBER(38) NO The reference count of the ps_session_info_ attribute in the session. After a statement is prepared in a session, a ps_session_info_ attribute is generated in the session.
    CHECKSUM NUMBER(38) NO The string checksum of the parameterized SQL statement in the prepared statement cache.

    The following table lists the parameter types and numbers in the PARAM_TYPES column.

    Parameter type
    Number
    MYSQL_TYPE_DECIMAL 0
    MYSQL_TYPE_TINY 1
    MYSQL_TYPE_SHORT 2
    MYSQL_TYPE_LONG 3
    MYSQL_TYPE_FLOAT 4
    MYSQL_TYPE_DOUBLE 5
    MYSQL_TYPE_NULL 6
    MYSQL_TYPE_TIMESTAMP 7
    MYSQL_TYPE_LONGLONG 8
    MYSQL_TYPE_INT24 9
    MYSQL_TYPE_DATE 10
    MYSQL_TYPE_TIME 11
    MYSQL_TYPE_DATETIME 12
    MYSQL_TYPE_YEAR 13
    MYSQL_TYPE_NEWDATE 14
    MYSQL_TYPE_VARCHAR 15
    MYSQL_TYPE_BIT 16
    MYSQL_TYPE_COMPLEX 160
    MYSQL_TYPE_ARRAY 161
    MYSQL_TYPE_STRUCT 162
    MYSQL_TYPE_CURSOR 163
    MYSQL_TYPE_OB_TIMESTAMP_WITH_TIME_ZONE 200
    MYSQL_TYPE_OB_TIMESTAMP_WITH_LOCAL_TIME_ZONE 201
    MYSQL_TYPE_OB_TIMESTAMP_NANO 202
    MYSQL_TYPE_OB_RAW 203
    MYSQL_TYPE_OB_INTERVAL_YM 204
    MYSQL_TYPE_OB_INTERVAL_DS 205
    MYSQL_TYPE_OB_NUMBER_FLOAT 206
    MYSQL_TYPE_OB_NVARCHAR2 207
    MYSQL_TYPE_OB_NCHAR 208
    MYSQL_TYPE_OB_UROWID 209
    MYSQL_TYPE_ORA_BLOB 210
    MYSQL_TYPE_ORA_CLOB 211

    Sample query

    Query the information about prepared statements opened in all sessions on the current OBServer node.

    obclient [SYS]> SELECT * FROM SYS.V$OB_SESSION_PS_INFO;
    

    The query result is as follows:

    +---------------+----------+-----------+------------------+------------+-------------------+------------------+-----------+-------------+-------------+-----------+------------+
    | SVR_IP        | SVR_PORT | TENANT_ID | PROXY_SESSION_ID | SESSION_ID | PS_CLIENT_STMT_ID | PS_INNER_STMT_ID | STMT_TYPE | PARAM_COUNT | PARAM_TYPES | REF_COUNT | CHECKSUM   |
    +---------------+----------+-----------+------------------+------------+-------------------+------------------+-----------+-------------+-------------+-----------+------------+
    | xx.xx.xx.xx   |    17119 |      1002 |                0 | 3221643421 |                 1 |                1 | T_SELECT  |           3 | 3, 15, 202  |         1 | 1807504655 |
    +---------------+----------+-----------+------------------+------------+-------------------+------------------+-----------+-------------+-------------+-----------+------------+
    

    References

    GV$OB_SESSION_PS_INFO

    Previous topic

    V$OB_SESSION
    Last

    Next topic

    V$OB_TABLET_COMPACTION_HISTORY
    Next
    What is on this page
    Purpose
    Columns
    Sample query
    References