OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

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

A unified distributed database ready for your transactional, analytical, and AI workloads.

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 Diagnostic Tool

V3.3.0

  • Overview
  • Install obdiag
  • Configure obdiag
  • One-click Cluster Inspection
    • Use obdiag to inspect an OceanBase cluster
    • Inspection metrics
  • One-click Information Collection
    • One-click General Information Collection
      • obdiag gather log
      • obdiag gather sysstat
      • obdiag gather plan_monitor
      • obdiag gather stack
      • obdiag gather perf
      • obdiag gather ash
      • obdiag gather tabledump
      • obdiag gather parameter
      • obdiag gather variable
      • obdiag gather clog/obdiag gather slog
      • obdiag gather obproxy_log
      • obdiag gather all
    • One-click Scenario-based Information Collection
      • observer.base
      • observer.backup
      • observer.backup_clean
      • observer.clog_disk_full
      • observer.cluster_down
      • observer.cpu_high
      • observer.io
      • observer.log_archive
      • observer.long_transaction
      • observer.memory
      • observer.perf_sql
      • observer.recovery
      • observer.rootservice_switch
      • observer.suspend_transaction
      • observer.unit_data_imbalance
      • observer.perf_sql
      • other.application_error
      • obproxy.restart
      • observer.unknown
      • Overview
      • observer.delay_of_primary_and_backup
      • observer.px_collect_log
      • observer.topsql
      • observer.restart
      • observer.compaction
  • One-click Diagnostic Analysis
    • obdiag analyze log
    • obdiag analyze flt_trace
    • obdiag analyze parameter default
    • obdiag analyze parameter diff
    • obdiag analyze variable diff
    • obdiag analyze index_space
    • obdiag analyze memory
    • obdiag analyze queue
  • One-click Root Cause Analysis
    • Use obdiag for root cause analysis
    • disconnection
    • major_hold
    • lock_conflict
    • ddl_disk_full
    • clog_disk_full
    • log_error
    • ddl_failure
    • index_ddl_error
    • transaction_disconnection
    • transaction_execute_timeout
    • transaction_not_ending
    • transaction_other_error
    • transaction_rollback
    • transaction_wait_timeout
    • oms_full_trans
    • oms_obcdc
    • suspend_transaction
  • One-click Cluster Display
    • Overview
    • Basic information of a cluster
    • Information about nodes in a cluster
    • Information about units in a cluster
    • Information about zones in a cluster
    • RootService information of a cluster
    • Information about tenants in a cluster
    • Information about events in a cluster
    • Information about locks in a cluster
    • Information about top SQL statements in a cluster
    • Information about slow SQL statements in a cluster
    • Information about tables in a cluster
    • Information about the process list in a tenant
    • Information about the execution plan of an SQL statement
    • Disk usage of a database
    • Disk usage of the specified table in a database
    • Information about all tenants in a cluster
    • Information about CPU utilization of nodes in a cluster
    • Internal table names fuzzy matched with the specified keyword
    • Information about leaders in a cluster
    • Information about locks on a table
    • Information about long-running transactions in a cluster
    • Information about operators in the actually executed plan
    • Information about the memory of all tenants
    • Information about statistics on real-time sessions of the process list
    • Information about the storage method of tables and indexes
    • Information about column NDVs of a table
    • Information about table indexes
  • Upgrade obdiag by using add-on files
  • Upgrade and uninstall obdiag
  • Telemetry Mode
  • FAQ
  • Release Notes
    • obdiag V3.3.0
    • obdiag V3.2.0
    • obdiag V3.1.0
    • obdiag V3.0.0
    • obdiag V2.6.0
    • obdiag V2.5.0
    • obdiag V2.4.0
    • obdiag V2.3.0
    • obdiag V2.2.0
    • obdiag V2.1.0
    • obdiag V2.0.0
    • obdiag V1.6.2
    • obdiag V1.6.1
    • obdiag V1.6.0
    • obdiag V1.5.2
    • obdiag V1.5.1
    • obdiag V1.5.0
    • obdiag V1.4.0
    • obdiag V1.3.0

Download PDF

Overview Install obdiag Configure obdiag Use obdiag to inspect an OceanBase cluster Inspection metrics obdiag gather log obdiag gather sysstat obdiag gather plan_monitor obdiag gather stack obdiag gather perf obdiag gather ash obdiag gather tabledump obdiag gather parameter obdiag gather variable obdiag gather clog/obdiag gather slog obdiag gather obproxy_log obdiag gather all observer.base observer.backup observer.backup_clean observer.clog_disk_full observer.cluster_down observer.cpu_high observer.io observer.log_archive observer.long_transaction observer.memory observer.perf_sql observer.recovery observer.rootservice_switch observer.suspend_transaction observer.unit_data_imbalance observer.perf_sql other.application_error obproxy.restart observer.unknown Overview observer.delay_of_primary_and_backup observer.px_collect_log observer.topsql observer.restart observer.compaction obdiag analyze log obdiag analyze flt_trace obdiag analyze parameter default obdiag analyze parameter diff obdiag analyze variable diff obdiag analyze index_space obdiag analyze memory obdiag analyze queue Use obdiag for root cause analysis disconnection major_hold lock_conflict ddl_disk_full clog_disk_full log_error ddl_failure index_ddl_error transaction_disconnection transaction_execute_timeout transaction_not_ending transaction_other_error transaction_rollback transaction_wait_timeout oms_full_trans oms_obcdc suspend_transaction Overview Basic information of a cluster Information about nodes in a cluster Information about units in a cluster Information about zones in a cluster RootService information of a cluster Information about tenants in a cluster Information about events in a cluster Information about locks in a cluster Information about top SQL statements in a cluster Information about slow SQL statements in a cluster Information about tables in a cluster Information about the process list in a tenant Information about the execution plan of an SQL statement Disk usage of a database Disk usage of the specified table in a database Information about all tenants in a cluster Information about CPU utilization of nodes in a cluster Internal table names fuzzy matched with the specified keyword Information about leaders in a cluster Information about locks on a table Information about long-running transactions in a cluster Information about operators in the actually executed plan Information about the memory of all tenants Information about statistics on real-time sessions of the process list Information about the storage method of tables and indexes Information about column NDVs of a table Information about table indexes Upgrade obdiag by using add-on files Upgrade and uninstall obdiag Telemetry Mode FAQ
OceanBase logo

The Unified Distributed Database for the AI Era.

Follow Us
Products
OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
Resources
DocsBlogLive DemosTraining & Certification
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 Diagnostic Tool
  3. V3.3.0
iconOceanBase Diagnostic Tool
V 3.3.0
  • V 3.3.0
  • V 3.2.0
  • V 3.1.0
  • V 3.0.0
  • V 2.6.0
  • V 2.5.0
  • V 2.4.0
  • V 2.3.0
  • V 1.5.0
  • V 1.4.0

obdiag analyze index_space

Last Updated:2026-04-13 09:12:30  Updated
share
What is on this page
Syntax
Examples

folded

share

You can run this command to analyze the space size of an existing index or an index to be created. Before you create an index, you can analyze its required space size based on the indexed column to avoid insufficient disk space.

Syntax

obdiag analyze index_space [option]

The following table describes the options.

Option Required? Data type Default value Description
--tenant_name Yes string Empty The name of the tenant.
--table_name Yes string Empty The name of the table.
--index_name No string Empty The name of the index.
--column_names No string Empty The name of the column. You can specify multiple column names separated with commas (,), for example, col1,col2,col3.

Examples

  • Analyze the space size of an existing index

    $ obdiag analyze index_space --tenant_name=test --table_name=student --index_name=name_index
    

    The output is as follows:

    analyze_index_space start ...
    start query estimated_table_data_size, please wait some minutes... ok
    +--------------------------------------------------------------------+
    |                    estimated-index-space-report                    |
    +--------------+------+-----------------------+----------------------+
    |      ip      | port | estimated_index_space | available_disk_space |
    +--------------+------+-----------------------+----------------------+
    | 10.10.10.1   | 2882 |        2.57 KB        |       55.07 GB       |
    | 10.10.10.3   | 2882 |        2.57 KB        |       55.07 GB       |
    | 10.10.10.2   | 2882 |        3.50 KB        |       54.98 GB       |
    +--------------+------+-----------------------+----------------------+
    Trace ID: 9cbf48b0-6a9f-11ef-82ec-000c2934fb31
    If you want to view detailed obdiag logs, please run: main.py display-trace 9cbf48b0-6a9f-11ef-82ec-000c2934fb31
    
  • Analyze the space size of an index to be created based on the specified indexed column

    $ obdiag analyze index_space --tenant_name=CHAT_BI --table_name=student --column_names=name
    

    The output is as follows:

    analyze_index_space start ...
    start query estimated_table_data_size, please wait some minutes... ok
    +--------------------------------------------------------------------+
    |                    estimated-index-space-report                    |
    +--------------+------+-----------------------+----------------------+
    |      ip      | port | estimated_index_space | available_disk_space |
    +--------------+------+-----------------------+----------------------+
    | 10.10.10.1   | 2882 |        2.57 KB        |       55.07 GB       |
    | 10.10.10.2   | 2882 |        3.50 KB        |       54.98 GB       |
    | 10.10.10.3   | 2882 |        2.57 KB        |       55.07 GB       |
    +--------------+------+-----------------------+----------------------+
    Trace ID: e71c5cc2-6a9f-11ef-9373-000c2934fb31
    If you want to view detailed obdiag logs, please run: main.py display-trace e71c5cc2-6a9f-11ef-9373-000c2934fb31
    

Previous topic

obdiag analyze variable diff
Last

Next topic

obdiag analyze memory
Next
What is on this page
Syntax
Examples