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

    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.0
    iconOceanBase Database
    SQL - V 4.2.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

    V$OB_SQL_AUDIT

    Last Updated:2024-10-24 03:07:40  Updated
    Share
    What is on this page
    Purpose
    Columns

    folded

    Share

    Purpose

    The V$OB_SQL_AUDIT view displays statistics about each SQL request on the current OBServer node, such as the source and execution status of the request. This view is tenant-specific, and only the sys tenant can query this view in other tenants.

    Note

    This view is introduced since OceanBase Database V4.0.0.

    Columns

    Column
    Type
    Nullable?
    Description
    SVR_IP VARCHAR2(46) NO The IP address of the server.
    SVR_PORT NUMBER(38) NO The port number of the server.
    REQUEST_ID NUMBER(38) NO The ID of the request.
    SQL_EXEC_ID NUMBER(38) NO The ID of the current execution.
    TRACE_ID VARCHAR2(128) NO The trace ID of the statement.
    SID NUMBER(38) NO The ID of the session connection.
    CLIENT_IP VARCHAR2(46) NO
  • When the client is connected to the OBServer node by using OceanBase Database Proxy (ODP), this column indicates the IP address of the ODP instance that forwarded the request.
  • When the client is directly connected to the OBServer node, this column indicates the IP address of the client that sent the request.
  • CLIENT_PORT NUMBER(38) NO The port number of the client that sent the request.
    TENANT_ID NUMBER(38) NO The ID of the tenant that sent the request.
    EFFECTIVE_TENANT_ID NUMBER(38) NO The ID of the tenant.
    TENANT_NAME VARCHAR2(64) NO The name of the tenant that sent the request.
    USER_ID NUMBER(38) NO The ID of the user that sent the request.
    USER_NAME VARCHAR2(64) NO The name of the user that sent the request.
    USER_GROUP NUMBER(38) NO The ID of the resource group to which the user belongs.
    USER_CLIENT_IP VARCHAR2(32) NO The IP address of the client that sent the request.
    DB_ID NUMBER(38) NO The ID of the database.
    DB_NAME VARCHAR2(128) NO The name of the database.
    SQL_ID VARCHAR2(32) NO The ID of the SQL statement.
    QUERY_SQL CLOB NO The actual SQL statement.
    PLAN_ID NUMBER(38) NO The ID of the execution plan.
    AFFECTED_ROWS NUMBER(38) NO The number of rows affected.
    RETURN_ROWS NUMBER(38) NO The number of rows returned.
    PARTITION_CNT NUMBER(38) NO The number of partitions scanned by the request.
    RET_CODE NUMBER(38) NO The return code of the execution. Valid values:
  • 0: indicates that the statement is successfully executed without errors.
  • Other return codes: indicate that OceanBase Database has encountered an error. For more information about the error codes, see Error codes
  • QC_ID NUMBER(38) NO The ID of the scheduler in the parallel execution scenario.
    DFO_ID NUMBER(38) NO The ID of the sub-plan being executed in the parallel execution scenario.
    SQC_ID NUMBER(38) NO The ID of the local coordinator in the parallel execution scenario.
    WORKER_ID NUMBER(38) NO The ID of the worker thread in the parallel execution scenario.
    EVENT VARCHAR2(64) NO The name of the wait event with the longest wait time.
    P1TEXT VARCHAR2(64) NO The first parameter of the wait event.
    P1 NUMBER(38) NO The value of the first parameter of the wait event.
    P2TEXT VARCHAR2(64) NO The second parameter of the wait event.
    P2 NUMBER(38) NO The value of the second parameter of the wait event.
    P3TEXT VARCHAR2(64) NO The third parameter of the wait event.
    P3 NUMBER(38) NO The value of the third parameter of the wait event.
    LEVEL NUMBER(38) NO The level of the wait event.
    WAIT_CLASS_ID NUMBER(38) NO The ID of the class to which the wait event belongs.
    WAIT_CLASS# NUMBER(38) NO The subscript of the class to which the wait event belongs.
    WAIT_CLASS VARCHAR2(64) NO The name of the class to which the wait event belongs.
    STATE VARCHAR2(19) NO The status of the wait event.
    WAIT_TIME_MICRO NUMBER(38) NO The wait time of the wait event in microseconds.
    TOTAL_WAIT_TIME_MICRO NUMBER(38) NO The total wait time in microseconds during execution.
    TOTAL_WAITS NUMBER(38) NO The total number of waits during the execution.
    RPC_COUNT NUMBER(38) NO The number of remote procedure calls (RPCs) sent.
    PLAN_TYPE NUMBER(38) NO The type of the execution plan. Valid values:
  • local
  • remote
  • distribute
  • IS_INNER_SQL NUMBER(38) NO Indicates whether the request is an internal SQL request.
    IS_EXECUTOR_RPC NUMBER(38) NO Indicates whether the current request is an RPC request.
    IS_HIT_PLAN NUMBER(38) NO Indicates whether the plan cache is hit.
    REQUEST_TIME NUMBER(38) NO The time when the execution starts.
    ELAPSED_TIME NUMBER(38) NO The amount of time elapsed from when the request was received to when the execution of the request ended.
    NET_TIME NUMBER(38) NO The amount of time elapsed from when the RPC was sent to when the request was received.
    NET_WAIT_TIME NUMBER(38) NO The amount of time elapsed from when the request was received to when it entered the queue.
    QUEUE_TIME NUMBER(38) NO The time that the request waits in the queue.
    DECODE_TIME NUMBER(38) NO The time spent on decoding the request after it left the queue.
    GET_PLAN_TIME NUMBER(38) NO The amount of time elapsed from when the processing started to when the plan was obtained.
    EXECUTE_TIME NUMBER(38) NO The time consumed for plan execution.
    APPLICATION_WAIT_TIME NUMBER(38) NO The total amount of time spent on waiting for events of the application class.
    CONCURRENCY_WAIT_TIME NUMBER(38) NO The total amount of time spent on waiting for events of the concurrency class.
    USER_IO_WAIT_TIME NUMBER(38) NO The total amount of time spent on waiting for events of the user_io class.
    SCHEDULE_TIME NUMBER(38) NO The total amount of time spent on events of the schedule class.
    ROW_CACHE_HIT NUMBER(38) NO The number of row cache hits.
    BLOOM_FILTER_CACHE_HIT NUMBER(38) NO The number of Bloom filter cache hits.
    BLOCK_CACHE_HIT NUMBER(38) NO The number of block cache hits.
    DISK_READS NUMBER(38) NO The number of physical reads.
    RETRY_CNT NUMBER(38) NO The number of retries.
    TABLE_SCAN NUMBER(38) NO Indicates whether the request contains a full table scan.
    CONSISTENCY_LEVEL NUMBER(38) NO The consistency level.
    MEMSTORE_READ_ROW_COUNT NUMBER(38) NO The number of rows read in the MemStore.
    SSSTORE_READ_ROW_COUNT NUMBER(38) NO The number of rows consecutively read in the SSStore.
    REQUEST_MEMORY_USED NUMBER(38) NO The memory consumed by the request.
    EXPECT_WORKER_COUNT NUMBER(38) NO The number of worker threads expected by the request.
    USED_WORKER_COUNT NUMBER(38) NO The number of worker threads used by the request.
    SCHED_INFO VARCHAR2(16384) NO The scheduling information about the request.
    PS_STMT_ID NUMBER(38) NO The ID of the prepared statement corresponding to the request.
  • -1: indicates that the prepared statement (PS) protocol is not used in the SQL statement.
  • Value other than -1: indicates that the PS protocol is used in the SQL statement. It also indicates the unique identifier returned by the PS protocol for the statement.
  • TRANSACTION_HASH NUMBER(38) NO The hash value of the transaction corresponding to the request.
    REQUEST_TYPE NUMBER(38) NO The type of the request. Valid values:
  • 0: indicates an invalid request.
  • 1: indicates an internal request.
  • 2: indicates a local request whose execution plan is a local plan.
  • 3: indicates a remote request.
  • 4: indicates a distributed request.
  • 5: indicates an SQL PREPARE request.
  • 6: indicates an SQL Execute Stmt request.
  • IS_BATCHED_MULTI_STMT NUMBER(38) NO Indicates whether optimization has been performed for batch execution of multiple statements.
    OB_TRACE_INFO VARCHAR2(4096) NO The trace information configured by the user.
    PLAN_HASH NUMBER(38) NO The hash value of the execution plan.
    PARAMS_VALUE CLOB NO The PS-bound parameter value.

    Previous topic

    V$SESSTAT
    Last

    Next topic

    V$SQL_WORKAREA
    Next
    What is on this page
    Purpose
    Columns