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

    oceanbase.DBA_IND_STATISTICS

    Last Updated:2026-06-09 06:18:53  Updated
    Share
    What is on this page
    Purpose
    Columns
    Sample query
    References

    folded

    Share

    Note

    This view is available starting with V4.0.0.

    Purpose

    This view displays the optimizer statistics of all indexes in the current tenant.

    Columns

    Column
    Type
    Nullable
    Description
    OWNER varchar(128) NO The owner of the index.
    INDEX_NAME varchar(128) NO The name of the index.
    TABLE_OWNER varchar(128) NO The owner of the index object.
    TABLE_NAME varchar(128) NO The name of the index object.
    PARTITION_NAME varchar(128) NO The name of the partition.
    PARTITION_POSITION decimal(10,0) NO The position of the partition in the index.
    SUBPARTITION_NAME varchar(128) NO The name of the subpartition.
    SUBPARTITION_POSITION decimal(10,0) NO The position of the subpartition in the partition.
    OBJECT_TYPE varchar(12) NO The object type. Valid values:
    • INDEX
    • PARTITION
    • SUBPARTITION
    BLEVEL decimal(10,0) NO This column is reserved and will be NULL by default.
    LEAF_BLOCKS decimal(10,0) NO This column is reserved and will be NULL by default.
    DISTINCT_KEYS decimal(10,0) NO This column is reserved and will be NULL by default.
    AVG_LEAF_BLOCKS_PER_KEY decimal(10,0) NO This column is reserved and will be NULL by default.
    AVG_DATA_BLOCKS_PER_KEY decimal(10,0) NO This column is reserved and will be NULL by default.
    CLUSTERING_FACTOR decimal(10,0) NO This column is reserved and will be NULL by default.
    NUM_ROWS decimal(10,0) NO The number of rows in the index.
    AVG_CACHED_BLOCKS decimal(10,0) NO This column is reserved and will be NULL by default.
    AVG_CACHE_HIT_RATIO decimal(10,0) NO This column is reserved and will be NULL by default.
    SAMPLE_SIZE decimal(10,0) NO This column is reserved and will be NULL by default.
    LAST_ANALYZED datetime(6) NO The date when the index was last analyzed.
    GLOBAL_STATS varchar(3) NO Indicates whether statistics are collected or incrementally maintained. Valid values:
    • YES
    • NO
    USER_STATS varchar(3) NO Indicates whether statistics are directly input by users. Valid values:
    • YES
    • NO
    STATTYPE_LOCKED varchar(5) NO The type of the statistics lock.
    STALE_STATS varchar(3) NO Indicates whether the statistics of the object are outdated.
    SCOPE varchar(7) NO This column is reserved and will be NULL by default.

    Sample query

    Query the optimizer statistics of the tbl2_f_rl_idx1 index in the sys tenant.

    obclient [oceanbase]> SELECT * FROM oceanbase.DBA_IND_STATISTICS WHERE INDEX_NAME='tbl2_f_rl_idx1'\G
    

    The query result is as follows:

    *************************** 1. row ***************************
                      OWNER: test
                 INDEX_NAME: tbl2_f_rl_idx1
                TABLE_OWNER: test
                 TABLE_NAME: tbl2_f_rl
             PARTITION_NAME: p1
         PARTITION_POSITION: 2
          SUBPARTITION_NAME: sp5
      SUBPARTITION_POSITION: 3
                OBJECT_TYPE: SUBPARTITION
                     BLEVEL: NULL
                LEAF_BLOCKS: NULL
              DISTINCT_KEYS: NULL
    AVG_LEAF_BLOCKS_PER_KEY: NULL
    AVG_DATA_BLOCKS_PER_KEY: NULL
          CLUSTERING_FACTOR: NULL
                   NUM_ROWS: NULL
          AVG_CACHED_BLOCKS: NULL
        AVG_CACHE_HIT_RATIO: NULL
                SAMPLE_SIZE: NULL
              LAST_ANALYZED: NULL
               GLOBAL_STATS: NULL
                 USER_STATS: NULL
            STATTYPE_LOCKED: NULL
                STALE_STATS: NULL
                      SCOPE: NULL
    *************************** 2. row ***************************
                      OWNER: test
                 INDEX_NAME: tbl2_f_rl_idx1
                TABLE_OWNER: test
                 TABLE_NAME: tbl2_f_rl
             PARTITION_NAME: p1
         PARTITION_POSITION: 2
          SUBPARTITION_NAME: sp4
      SUBPARTITION_POSITION: 2
                OBJECT_TYPE: SUBPARTITION
                     BLEVEL: NULL
                LEAF_BLOCKS: NULL
              DISTINCT_KEYS: NULL
    AVG_LEAF_BLOCKS_PER_KEY: NULL
    AVG_DATA_BLOCKS_PER_KEY: NULL
          CLUSTERING_FACTOR: NULL
                   NUM_ROWS: NULL
          AVG_CACHED_BLOCKS: NULL
        AVG_CACHE_HIT_RATIO: NULL
                SAMPLE_SIZE: NULL
              LAST_ANALYZED: NULL
               GLOBAL_STATS: NULL
                 USER_STATS: NULL
            STATTYPE_LOCKED: NULL
                STALE_STATS: NULL
                      SCOPE: NULL
    *************************** 3. row ***************************
                      OWNER: test
                 INDEX_NAME: tbl2_f_rl_idx1
                TABLE_OWNER: test
                 TABLE_NAME: tbl2_f_rl
             PARTITION_NAME: p1
         PARTITION_POSITION: 2
          SUBPARTITION_NAME: sp3
      SUBPARTITION_POSITION: 1
                OBJECT_TYPE: SUBPARTITION
                     BLEVEL: NULL
                LEAF_BLOCKS: NULL
              DISTINCT_KEYS: NULL
    AVG_LEAF_BLOCKS_PER_KEY: NULL
    AVG_DATA_BLOCKS_PER_KEY: NULL
          CLUSTERING_FACTOR: NULL
                   NUM_ROWS: NULL
          AVG_CACHED_BLOCKS: NULL
        AVG_CACHE_HIT_RATIO: NULL
                SAMPLE_SIZE: NULL
              LAST_ANALYZED: NULL
               GLOBAL_STATS: NULL
                 USER_STATS: NULL
            STATTYPE_LOCKED: NULL
                STALE_STATS: NULL
                      SCOPE: NULL
    *************************** 4. row ***************************
                      OWNER: test
                 INDEX_NAME: tbl2_f_rl_idx1
                TABLE_OWNER: test
                 TABLE_NAME: tbl2_f_rl
             PARTITION_NAME: p0
         PARTITION_POSITION: 1
          SUBPARTITION_NAME: sp2
      SUBPARTITION_POSITION: 3
                OBJECT_TYPE: SUBPARTITION
                     BLEVEL: NULL
                LEAF_BLOCKS: NULL
              DISTINCT_KEYS: NULL
    AVG_LEAF_BLOCKS_PER_KEY: NULL
    AVG_DATA_BLOCKS_PER_KEY: NULL
          CLUSTERING_FACTOR: NULL
                   NUM_ROWS: NULL
          AVG_CACHED_BLOCKS: NULL
        AVG_CACHE_HIT_RATIO: NULL
                SAMPLE_SIZE: NULL
              LAST_ANALYZED: NULL
               GLOBAL_STATS: NULL
                 USER_STATS: NULL
            STATTYPE_LOCKED: NULL
                STALE_STATS: NULL
                      SCOPE: NULL
    *************************** 5. row ***************************
                      OWNER: test
                 INDEX_NAME: tbl2_f_rl_idx1
                TABLE_OWNER: test
                 TABLE_NAME: tbl2_f_rl
             PARTITION_NAME: p0
         PARTITION_POSITION: 1
          SUBPARTITION_NAME: sp1
      SUBPARTITION_POSITION: 2
                OBJECT_TYPE: SUBPARTITION
                     BLEVEL: NULL
                LEAF_BLOCKS: NULL
              DISTINCT_KEYS: NULL
    AVG_LEAF_BLOCKS_PER_KEY: NULL
    AVG_DATA_BLOCKS_PER_KEY: NULL
          CLUSTERING_FACTOR: NULL
                   NUM_ROWS: NULL
          AVG_CACHED_BLOCKS: NULL
        AVG_CACHE_HIT_RATIO: NULL
                SAMPLE_SIZE: NULL
              LAST_ANALYZED: NULL
               GLOBAL_STATS: NULL
                 USER_STATS: NULL
            STATTYPE_LOCKED: NULL
                STALE_STATS: NULL
                      SCOPE: NULL
    *************************** 6. row ***************************
                      OWNER: test
                 INDEX_NAME: tbl2_f_rl_idx1
                TABLE_OWNER: test
                 TABLE_NAME: tbl2_f_rl
             PARTITION_NAME: p0
         PARTITION_POSITION: 1
          SUBPARTITION_NAME: sp0
      SUBPARTITION_POSITION: 1
                OBJECT_TYPE: SUBPARTITION
                     BLEVEL: NULL
                LEAF_BLOCKS: NULL
              DISTINCT_KEYS: NULL
    AVG_LEAF_BLOCKS_PER_KEY: NULL
    AVG_DATA_BLOCKS_PER_KEY: NULL
          CLUSTERING_FACTOR: NULL
                   NUM_ROWS: NULL
          AVG_CACHED_BLOCKS: NULL
        AVG_CACHE_HIT_RATIO: NULL
                SAMPLE_SIZE: NULL
              LAST_ANALYZED: NULL
               GLOBAL_STATS: NULL
                 USER_STATS: NULL
            STATTYPE_LOCKED: NULL
                STALE_STATS: NULL
                      SCOPE: NULL
    *************************** 7. row ***************************
                      OWNER: test
                 INDEX_NAME: tbl2_f_rl_idx1
                TABLE_OWNER: test
                 TABLE_NAME: tbl2_f_rl
             PARTITION_NAME: p1
         PARTITION_POSITION: 2
          SUBPARTITION_NAME: NULL
      SUBPARTITION_POSITION: NULL
                OBJECT_TYPE: PARTITION
                     BLEVEL: NULL
                LEAF_BLOCKS: NULL
              DISTINCT_KEYS: NULL
    AVG_LEAF_BLOCKS_PER_KEY: NULL
    AVG_DATA_BLOCKS_PER_KEY: NULL
          CLUSTERING_FACTOR: NULL
                   NUM_ROWS: 0
          AVG_CACHED_BLOCKS: NULL
        AVG_CACHE_HIT_RATIO: NULL
                SAMPLE_SIZE: NULL
              LAST_ANALYZED: 2025-03-14 10:48:23.542494
               GLOBAL_STATS: NO
                 USER_STATS: NO
            STATTYPE_LOCKED: NULL
                STALE_STATS: NO
                      SCOPE: NULL
    *************************** 8. row ***************************
                      OWNER: test
                 INDEX_NAME: tbl2_f_rl_idx1
                TABLE_OWNER: test
                 TABLE_NAME: tbl2_f_rl
             PARTITION_NAME: p0
         PARTITION_POSITION: 1
          SUBPARTITION_NAME: NULL
      SUBPARTITION_POSITION: NULL
                OBJECT_TYPE: PARTITION
                     BLEVEL: NULL
                LEAF_BLOCKS: NULL
              DISTINCT_KEYS: NULL
    AVG_LEAF_BLOCKS_PER_KEY: NULL
    AVG_DATA_BLOCKS_PER_KEY: NULL
          CLUSTERING_FACTOR: NULL
                   NUM_ROWS: 0
          AVG_CACHED_BLOCKS: NULL
        AVG_CACHE_HIT_RATIO: NULL
                SAMPLE_SIZE: NULL
              LAST_ANALYZED: 2025-03-14 10:48:23.542494
               GLOBAL_STATS: NO
                 USER_STATS: NO
            STATTYPE_LOCKED: NULL
                STALE_STATS: NO
                      SCOPE: NULL
    *************************** 9. row ***************************
                      OWNER: test
                 INDEX_NAME: tbl2_f_rl_idx1
                TABLE_OWNER: test
                 TABLE_NAME: tbl2_f_rl
             PARTITION_NAME: NULL
         PARTITION_POSITION: NULL
          SUBPARTITION_NAME: NULL
      SUBPARTITION_POSITION: NULL
                OBJECT_TYPE: INDEX
                     BLEVEL: NULL
                LEAF_BLOCKS: NULL
              DISTINCT_KEYS: NULL
    AVG_LEAF_BLOCKS_PER_KEY: NULL
    AVG_DATA_BLOCKS_PER_KEY: NULL
          CLUSTERING_FACTOR: NULL
                   NUM_ROWS: 0
          AVG_CACHED_BLOCKS: NULL
        AVG_CACHE_HIT_RATIO: NULL
                SAMPLE_SIZE: NULL
              LAST_ANALYZED: 2025-03-14 10:48:23.542494
               GLOBAL_STATS: NO
                 USER_STATS: NO
            STATTYPE_LOCKED: NULL
                STALE_STATS: NO
                      SCOPE: NULL
    9 rows in set
    

    References

    • View column statistics at the table level: DBA_TAB_STATISTICS

    • View column statistics at the global level: DBA_TAB_COL_STATISTICS

    • View column statistics at the partition level: DBA_PART_COL_STATISTICS

    • View column statistics at the subpartition level: DBA_SUBPART_COL_STATISTICS

    • View histogram statistics at the table level: DBA_TAB_HISTOGRAMS

    • View histogram statistics at the partition level: DBA_PART_HISTOGRAMS

    • View histogram statistics at the subpartition level: DBA_SUBPART_HISTOGRAMS

    • For information about how to collect statistics, see the following topics:

      • Manually collect statistics

      • Automatically collect statistics

    Previous topic

    oceanbase.CDB_OB_BACKUP_DELETE_JOBS
    Last

    Next topic

    oceanbase.DBA_OB_BACKUP_DELETE_JOBS
    Next
    What is on this page
    Purpose
    Columns
    Sample query
    References