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.6.0

    Download PDF

    OceanBase logo

    The Unified Distributed Database for the AI Era.

    Follow Us
    Products
    OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
    Resources
    DocsBlogWhite PaperLive 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.6.0
    iconOceanBase Database
    SQL - V 4.6.0
    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

    GV$SESSION_WAIT

    Last Updated:2026-05-07 11:26:24  Updated
    Share
    What is on this page
    Purpose
    Columns
    Sample query

    folded

    Share

    Note

    This view is available starting with V1.4.

    Purpose

    The GV$SESSION_WAIT view displays information about the current or previous wait events of all sessions on all nodes, including the wait event name, wait time, and other parameters.

    Columns

    Column
    Type
    Nullable
    Description
    SID NUMBER NO For V4.3.x:
    • V4.3.5 BP2 and earlier:
      This field represents the server session ID in all connection modes (direct mode/ODP mode).
    • V4.3.5 BP2 and later:
      • In direct mode:
        This field represents the server session ID.
      • In ODP mode:
        • If the client_session_id_version = 2 parameter is set in ODP, this field represents the client session ID.
        • If client_session_id_version = 1, this field represents the server session ID.
    CON_ID NUMBER NO Tenant ID
    SVR_IP VARCHAR2(46) NO Server IP address
    SVR_PORT NUMBER(38) NO Server port
    EVENT VARCHAR2(64) NO Name of the wait event
    P1TEXT VARCHAR2(64) NO Description of the first parameter of the wait event
    P1 NUMBER NO Value of the first parameter of the wait event
    P2TEXT VARCHAR2(64) NO Description of the second parameter of the wait event
    P2 NUMBER NO Value of the second parameter of the wait event
    P3TEXT VARCHAR2(64) NO Description of the third parameter of the wait event
    P3 NUMBER(38) NO Value of the third parameter of the wait event
    WAIT_CLASS_ID NUMBER NO ID of the wait event category
    WAIT_CLASS# NUMBER NO Sequence number of the wait event category
    WAIT_CLASS VARCHAR2(64) NO Name of the wait event category
    STATE VARCHAR2(19) NO Current state of the wait event. Valid values:
    • Waiting: The session is waiting for this event.
    • Waited unknown time: Time information cannot be obtained because the value of the timed_statistics parameter is set to false. This indicates that the session has waited for a very short period.
    • Wait short time: The session has waited for a very short period that is less than one time unit, so the wait is not recorded.
    • Waited known time: The session has waited for the required resources.
    WAIT_TIME_MICRO NUMBER NO Wait time in microseconds. If the session is currently waiting, this field indicates the elapsed wait time. If the session is not waiting, this field indicates the total wait time of the last wait.
    TIME_REMAINING_MICRO NUMBER NO
    • > 0: The last wait time in microseconds. The session is not waiting.
    • 0: The session is waiting for the current event.
    • -1: The last wait time is less than one time unit. The session is not waiting.
    • -2: Time statistics are not available. The session is not waiting.
    TIME_SINCE_LAST_WAIT_MICRO NUMBER NO Time elapsed since the last wait ended, in microseconds. If the session is currently waiting, this field is 0.

    Sample query

    Query information about the current or previous wait events of all sessions on all nodes.

    obclient [SYS]> SELECT * FROM SYS.GV$SESSION_WAIT WHERE ROWNUM =1\G
    

    The query result is as follows:

    *************************** 1. row ***************************
                           SID: 1152921504606867748
                        CON_ID: 1004
                        SVR_IP: xx.xx.xx.xx
                      SVR_PORT: 2882
                         EVENT: wait in request queue
                        P1TEXT: pcode
                            P1: 5386
                        P2TEXT: level
                            P2: 0
                        P3TEXT: priority
                            P3: 0
                 WAIT_CLASS_ID: 102
                   WAIT_CLASS#: 2
                    WAIT_CLASS: CONFIGURATION
                         STATE: WAITED SHORT TIME
               WAIT_TIME_MICRO: 21
          TIME_REMAINING_MICRO: -1
    TIME_SINCE_LAST_WAIT_MICRO: -360953114840905368
    

    Previous topic

    GV$OPEN_CURSOR
    Last

    Next topic

    GV$SESSION_WAIT_HISTORY
    Next
    What is on this page
    Purpose
    Columns
    Sample query