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 - V3.2.4Enterprise Edition

    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. V3.2.4
    iconOceanBase Database
    SQL - V 3.2.4Enterprise Edition
    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$plan_cache_plan_stat

    Last Updated:2023-10-24 09:23:03  Updated
    Share
    What is on this page
    Purpose
    Related tables/views
    Fields

    folded

    Share

    Purpose

    gv$plan_cache_plan_stat displays the status of each object that is cached by the current tenant in the plan caches on all servers.

    Note
    This table caches not only SQL plan objects, but also PL objects, such as anonymous blocks, PL packages, and PL functions. Some fields are valid only for specific objects.

    Related tables/views

    oceanbase.__all_virtual_plan_stat

    Fields

    Field
    Type
    Nullable?
    Description
    tenant_id bigint(20) NO The ID of the tenant.
    svr_ip varchar(32) NO The IP address of the server.
    svr_port bigint(20) NO The port number of the server.
    plan_id bigint(20) NO The ID of the plan.
    sql_id varchar(32) NO The SQL ID corresponding to the cached object. If it is a PL object, the value of this field is NULL.
    type bigint(20) NO For SQL plan caching, this field 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 field indicates the type of the PL object.
  • 1: indicates a procedure.
  • 2: indicates a function.
  • 3: indicates a package.
  • 4: anonymous block
  • is_bind_sensitive bigint(20) NO Specifies whether Adaptive Cursor Sharing (ACS) needs to be enabled for the plan.
    is_bind_aware bigint(20) NO Indicates whether ACS is enabled for the plan.
    db_id bigint(20) unsigned NO The ID of the database.
    statement varchar(4096) NO If the cached object is an SQL plan, the field value is a parameterized SQL statement. If the cached object is a PL object, the field value is a parameterized anonymous block statement. This field is invalid for other types of objects.
    query_sql varchar(65536) NO If the cached object is an SQL plan, the field value is the original SQL statement queried when the plan was loaded for the first time. If the cached object is a PL object, the field value is a parameterized anonymous block statement.
    special_params varchar(4096) NO The values of parameters that cannot be parameterized.
    param_infos longtext NO The parameter information.
    sys_vars varchar(4096) NO The value of the system variable that affects the plan.
    plan_hash bigint(20) unsigned NO The hash value of the SQL plan.
    first_load_time timestamp(6) NO The time when the plan was loaded for the first time.
    schema_version bigint(20) NO The version of the schema.
    merged_version bigint(20) NO The compaction version corresponding to the current cached plan.
    last_active_time timestamp(6) NO The time of the last execution.
    avg_exe_usec bigint(20) NO The average execution duration.
    slowest_exe_time timestamp(6) NO The timestamp of the slowest execution.
    slowest_exe_usec bigint(20) NO The time consumed by the slowest execution.
    slow_count bigint(20) NO The number of times that the current SQL plan was identified as a slow query.
    hit_count bigint(20) NO The number of hits.
    plan_size bigint(20) NO The size of memory occupied by the cached object.
    executions bigint(20) NO The number of executions.
    disk_reads bigint(20) NO The total number of physical reads of all executions.
    direct_writes bigint(20) NO The total number of physical writes of all executions.
    buffer_gets bigint(20) NO The total number of logical reads of all executions.
    application_wait_time bigint(20) unsigned NO The total amount of time spent on waiting for events of the application class.
    concurrency_wait_time bigint(20) unsigned NO The total amount of time spent on waiting for events of the concurrency class.
    user_io_wait_time bigint(20) unsigned NO The total amount of time spent on waiting for events of the user_io class.
    rows_processed bigint(20) NO The total number of rows in the results selected for all executions or the number of rows modified by executing the ALTER TABLE statement.
    elapsed_time bigint(20) unsigned NO The amount of time elapsed from when the request was received to when the execution of the request ended.
    cpu_time bigint(20) unsigned NO The total amount of CPU time consumed by all executions.
    large_querys bigint(20) NO The number of times the cached object was considered a large query.
    delayed_large_querys bigint(20) NO The number of times the cached object was considered a large query and placed in the large query queue.
    delayed_px_querys bigint(20) NO The number of times the parallel query was placed in the queue for retries.
    outline_version bigint(20) NO The version of the outline.
    outline_id bigint(20) NO The ID of the outline. The value "-1" indicates that the plan is not generated based on a bound outline.
    outline_data varchar(65536) NO The information about the outline corresponding to the plan.
    acs_sel_info varchar(65536) NO The range of selectivity for the current ACS-enabled plan.
    table_scan tinyint(4) NO Specifies whether the query is a primary key scan.
    evolution tinyint(4) NO Indicates whether the execution plan is evolving.
    evo_executions bigint(20) NO The number of evolutions.
    evo_cpu_time bigint(20) unsigned NO The total amount of CPU time for executions during the evolution.
    timeout_count bigint(20) NO The number of timeouts.
    ps_stmt_id bigint(20) 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.
  • A value other than -1: indicates that the PS protocol is used in the SQL statement, and indicates the unique identifier returned by the PS protocol for the statement.
  • sessid bigint(20) unsigned NO The ID of the session containing the cached object.
    temp_tables varchar(65536) NO The name of the temporary table contained in the SQL plan. This field is left empty if no temporary table exists.
    is_use_jit tinyint(4) NO Indicates whether just-in-time (JIT) compilation is enabled for the SQL plan.
    object_type varchar(65536) NO The type of the cached object. Valid values:
  • SQL_PLAN
  • PROCEDURE
  • FUNCTION
  • PACKAGE
  • ANONYMOUS
  • hints_info varchar(65536) NO The hints of the SQL plan.
    hints_all_worked tinyint(4) NO Indicates whether all the hints in the SQL plan have taken effect.
    pl_schema_id bigint(20) unsigned NO This field is the schema ID of the cached object for PL objects of non-anonymous blocks, is identical to ps_stmt_id for anonymous blocks, and meaningless for SQL plans.
    is_batched_multi_stmt tinyint(4) NO Indicates whether the plan has been optimized for batch execution of multiple statements.

    Previous topic

    gv$plan_cache_stat
    Last

    Next topic

    gv$session_event
    Next
    What is on this page
    Purpose
    Related tables/views
    Fields