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.3.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.3.0
    iconOceanBase Database
    SQL - V 4.3.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

    DBA_WR_SQLSTAT

    Last Updated:2026-04-15 08:30:02  Updated
    Share
    What is on this page
    Purpose
    Columns
    Sample query
    References

    folded

    Share

    Note

    This view is introduced since OceanBase Database V4.2.2.

    Purpose

    The DBA_WR_SQLSTAT view displays the basic performance statistics of SQL statements executed in the current tenant. A column whose name contains _DELTA indicates the incremental value since a Workload Repository (WR) snapshot was last collected.

    Columns

    Column
    Type
    Nullable?
    Description
    SNAP_ID NUMBER(38) NO The ID of the snapshot.
    SVR_IP VARCHAR2(46) NO The IP address of the OBServer node.
    SVR_PORT NUMBER(38) NO The port number of the OBServer node.
    SQL_ID VARCHAR2(32) NO The ID of the SQL statement.
    PLAN_HASH NUMBER(38) NO The hash value of the execution plan.
    PLAN_ID NUMBER(38) NO The ID of the execution plan.
    PLAN_TYPE NUMBER(38) NO For SQL plan caching, this column indicates the type of the plan. Valid values:
    • 1: indicates a local plan.
    • 2: indicates a remote plan.
    • 3: indicates a distributed plan.

    For PL object caching, this column indicates the type of the PL object. Valid values:
    • 1: indicates a procedure.
    • 2: indicates a function.
    • 3: indicates a package.
    • 4: indicates an anonymous block.
    MODULE VARCHAR2(64) YES The application module by which the statement was first parsed.
    ACTION VARCHAR2(64) YES The application action by which the statement was first parsed.
    PARSING_DB_ID NUMBER(38) NO The ID of the database where the statement was parsed.
    PARSING_DB_NAME VARCHAR2(128) NO The name of the database where the statement was parsed.
    PARSING_USER_ID NUMBER(38) NO The ID of the user who parsed the statement.
    EXECUTIONS_TOTAL NUMBER(38) NO The total number of executions of the plan in the plan cache.
    EXECUTIONS_DELTA NUMBER(38) NO The incremental number of executions of the plan in the plan cache.
    DISK_READS_TOTAL NUMBER(38) NO The total number of disk reads.
    DISK_READS_DELTA NUMBER(38) NO The incremental number of disk reads.
    BUFFER_GETS_TOTAL NUMBER(38) NO The total number of logical reads from the cache.
    BUFFER_GETS_DELTA NUMBER(38) NO The incremental number of logical reads from the cache.
    ELAPSED_TIME_TOTAL NUMBER(38) NO The total execution time of the statement. If the statement is executed by multiple threads in parallel, this value is the sum of the execution time taken by each thread.
    ELAPSED_TIME_DELTA NUMBER(38) NO The incremental execution time of the statement.
    CPU_TIME_TOTAL NUMBER(38) NO The total CPU time.
    CPU_TIME_DELTA NUMBER(38) NO The incremental amount of CPU time.
    CCWAIT_TOTAL NUMBER(38) NO The total amount of time waited for events of the concurrency class.
    CCWAIT_DELTA NUMBER(38) NO The incremental amount of time waited for events of the concurrency class.
    USERIO_WAIT_TOTAL NUMBER(38) NO The total amount of time waited for events of the user I/O class.
    USERIO_WAIT_DELTA NUMBER(38) NO The incremental amount of time waited for events of the user I/O class.
    APWAIT_TOTAL NUMBER(38) NO The total amount of time waited for events of the application class.
    APWAIT_DELTA NUMBER(38) NO The incremental amount of time waited for events of the application class.
    PHYSICAL_READ_REQUESTS_TOTAL NUMBER(38) NO The total number of physical reads.
    PHYSICAL_READ_REQUESTS_DELTA NUMBER(38) NO The incremental number of physical reads.
    PHYSICAL_READ_BYTES_TOTAL NUMBER(38) NO The total size in bytes of physical reads.
    PHYSICAL_READ_BYTES_DELTA NUMBER(38) NO The incremental size in bytes of physical reads.
    WRITE_THROTTLE_TOTAL NUMBER(38) NO The total amount of time of throttling for writes to the MemStore.
    WRITE_THROTTLE_DELTA NUMBER(38) NO The incremental amount of time of throttling for writes to the MemStore.
    ROWS_PROCESSED_TOTAL NUMBER(38) NO The total number of rows processed by the statement.
    ROWS_PROCESSED_DELTA NUMBER(38) NO The incremental number of rows processed by the statement.
    MEMSTORE_READ_ROWS_TOTAL NUMBER(38) NO The total number of rows read from the MemStore.
    MEMSTORE_READ_ROWS_DELTA NUMBER(38) NO The incremental number of rows read from the MemStore.
    MINOR_SSSTORE_READ_ROWS_TOTAL NUMBER(38) NO The total number of rows read from the minor SSStore.
    MINOR_SSSTORE_READ_ROWS_DELTA NUMBER(38) NO The incremental number of rows read from the minor SSStore.
    MAJOR_SSSTORE_READ_ROWS_TOTAL NUMBER(38) NO The total number of rows read from the major SSStore.
    MAJOR_SSSTORE_READ_ROWS_DELTA NUMBER(38) NO The incremental number of rows read from the major SSStore.
    RPC_TOTAL NUMBER(38) NO The total number of remote procedure call (RPC) requests.
    RPC_DELTA NUMBER(38) NO The incremental number of RPC requests.
    FETCHES_TOTAL NUMBER(38) NO The total number of result set fetches.
    FETCHES_DELTA NUMBER(38) NO The incremental number of result set fetches.
    RETRY_TOTAL NUMBER(38) NO The total number of retries of the SQL statement.
    RETRY_DELTA NUMBER(38) NO The incremental number of retries of the SQL statement.
    PARTITION_TOTAL NUMBER(38) NO The total number of partitions scanned by the SQL statement.
    PARTITION_DELTA NUMBER(38) NO The incremental number of partitions scanned by the SQL statement.
    NESTED_SQL_TOTAL NUMBER(38) NO The total number of executions of nested SQL statements. The value increases by 1 each time a nested SQL statement is executed.
    NESTED_SQL_DELTA NUMBER(38) NO The incremental number of executions of nested SQL statements.
    SOURCE_IP VARCHAR2(46) NO The IP address of the request source.
    SOURCE_PORT NUMBER(38) NO The port number of the request source.

    Sample query

    obclient [SYS]> SELECT * FROM SYS.DBA_WR_SQLSTAT WHERE ROWNUM = 1;
    

    The query result is as follows:

    +---------+----------------+----------+----------------------------------+---------------------+---------+-----------+--------+--------+---------------+-----------------+-----------------+------------------+------------------+------------------+------------------+-------------------+-------------------+--------------------+--------------------+----------------+----------------+--------------+--------------+-------------------+-------------------+--------------+--------------+------------------------------+------------------------------+---------------------------+---------------------------+----------------------+----------------------+----------------------+----------------------+--------------------------+--------------------------+-------------------------------+-------------------------------+-------------------------------+-------------------------------+-----------+-----------+---------------+---------------+-------------+-------------+-----------------+-----------------+------------------+------------------+----------------+-------------+
    | SNAP_ID | SVR_IP         | SVR_PORT | SQL_ID                           | PLAN_HASH           | PLAN_ID | PLAN_TYPE | MODULE | ACTION | PARSING_DB_ID | PARSING_DB_NAME | PARSING_USER_ID | EXECUTIONS_TOTAL | EXECUTIONS_DELTA | DISK_READS_TOTAL | DISK_READS_DELTA | BUFFER_GETS_TOTAL | BUFFER_GETS_DELTA | ELAPSED_TIME_TOTAL | ELAPSED_TIME_DELTA | CPU_TIME_TOTAL | CPU_TIME_DELTA | CCWAIT_TOTAL | CCWAIT_DELTA | USERIO_WAIT_TOTAL | USERIO_WAIT_DELTA | APWAIT_TOTAL | APWAIT_DELTA | PHYSICAL_READ_REQUESTS_TOTAL | PHYSICAL_READ_REQUESTS_DELTA | PHYSICAL_READ_BYTES_TOTAL | PHYSICAL_READ_BYTES_DELTA | WRITE_THROTTLE_TOTAL | WRITE_THROTTLE_DELTA | ROWS_PROCESSED_TOTAL | ROWS_PROCESSED_DELTA | MEMSTORE_READ_ROWS_TOTAL | MEMSTORE_READ_ROWS_DELTA | MINOR_SSSTORE_READ_ROWS_TOTAL | MINOR_SSSTORE_READ_ROWS_DELTA | MAJOR_SSSTORE_READ_ROWS_TOTAL | MAJOR_SSSTORE_READ_ROWS_DELTA | RPC_TOTAL | RPC_DELTA | FETCHES_TOTAL | FETCHES_DELTA | RETRY_TOTAL | RETRY_DELTA | PARTITION_TOTAL | PARTITION_DELTA | NESTED_SQL_TOTAL | NESTED_SQL_DELTA | SOURCE_IP      | SOURCE_PORT |
    +---------+----------------+----------+----------------------------------+---------------------+---------+-----------+--------+--------+---------------+-----------------+-----------------+------------------+------------------+------------------+------------------+-------------------+-------------------+--------------------+--------------------+----------------+----------------+--------------+--------------+-------------------+-------------------+--------------+--------------+------------------------------+------------------------------+---------------------------+---------------------------+----------------------+----------------------+----------------------+----------------------+--------------------------+--------------------------+-------------------------------+-------------------------------+-------------------------------+-------------------------------+-----------+-----------+---------------+---------------+-------------+-------------+-----------------+-----------------+------------------+------------------+----------------+-------------+
    |       1 | 172.xx.xxx.xxx |     2882 | 01058E374A5EF26873BA4D99C4A74582 | 5547575357486659143 |     223 |         1 | NULL   | NULL   |        201001 | oceanbase       |          200001 |                1 |                1 |                1 |                1 |                 1 |                 1 |               1699 |               1699 |              0 |              0 |            0 |            0 |                 0 |                 0 |            0 |            0 |                            1 |                            1 |                       193 |                       193 |                    0 |                    0 |                    0 |                    0 |                        0 |                        0 |                             0 |                             0 |                             0 |                             0 |         0 |         0 |             0 |             0 |           0 |           0 |               1 |               1 |                0 |                0 | 172.xx.xxx.xxx |        2882 |
    +---------+----------------+----------+----------------------------------+---------------------+---------+-----------+--------+--------+---------------+-----------------+-----------------+------------------+------------------+------------------+------------------+-------------------+-------------------+--------------------+--------------------+----------------+----------------+--------------+--------------+-------------------+-------------------+--------------+--------------+------------------------------+------------------------------+---------------------------+---------------------------+----------------------+----------------------+----------------------+----------------------+--------------------------+--------------------------+-------------------------------+-------------------------------+-------------------------------+-------------------------------+-----------+-----------+---------------+---------------+-------------+-------------+-----------------+-----------------+------------------+------------------+----------------+-------------+
    1 row in set
    

    References

    • oceanbase.CDB_WR_SQLSTAT

    • GV$OB_SQLSTAT

    • V$OB_SQLSTAT

    Previous topic

    DBA_WR_EVENT_NAME
    Last

    Next topic

    DBA_WR_SYS_TIME_MODEL
    Next
    What is on this page
    Purpose
    Columns
    Sample query
    References