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

    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.3.1
    iconOceanBase Database
    SQL - V 4.3.1
    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

    View dump information

    Last Updated:2026-04-15 08:25:14  Updated
    share
    What is on this page
    View the progress of a minor compaction
    View compaction history

    folded

    share

    After a dump is triggered, you can view the dump progress and history in views.

    View the progress of a minor compaction

    1. Log in to the sys tenant or a user tenant of the cluster as the tenant administrator.

    2. View the progress of the minor compaction, including the amount of data that remains to be compacted and the expected completion time.

      The GV$OB_TABLET_COMPACTION_PROGRESS view displays the progress of tablet-level compactions. It only shows tasks that are currently running. After a task is completed, it is no longer displayed in the view. You can run the following SQL statements to view the progress of a minor compaction:

      • View the progress of a minor compaction in the sys tenant

        obclient> SELECT * FROM oceanbase.GV$OB_TABLET_COMPACTION_PROGRESS WHERE TYPE='MINI_MERGE'\G
        
      • View the progress of a minor compaction in a user tenant

        • MySQL mode

          obclient> SELECT * FROM oceanbase.GV$OB_TABLET_COMPACTION_PROGRESS WHERE TYPE='MINI_MERGE'\G
          
        • Oracle mode

          obclient> SELECT * FROM SYS.GV$OB_TABLET_COMPACTION_PROGRESS WHERE TYPE='MINI_MERGE'\G
          

      Here is an example of the query result:

      *************************** 1. row ***************************
                            SVR_IP: xx.xx.xx.xx
                          SVR_PORT: 2401
                         TENANT_ID: 1002
                              TYPE: MINI_MERGE
                             LS_ID: 1001
                         TABLET_ID: 1152921504606847235
                    COMPACTION_SCN: 1680514780195130031
                           TASK_ID: Y9610BA2DA3E-0005F7FD6E1FE0FF-0-0
                            STATUS: NODE_RUNNING
                         DATA_SIZE: 31890729
              UNFINISHED_DATA_SIZE: 3351030
      PROGRESSIVE_COMPACTION_ROUND: 1
                       CREATE_TIME: 2023-04-03 17:49:17.278506
                        START_TIME: 2023-04-03 17:51:57.953999
             ESTIMATED_FINISH_TIME: 2023-04-03 23:32:25.969930
                       START_CG_ID: 0
                         END_CG_ID: 0
      1 row in set
      

      The following table describes some columns in the result.

      • TYPE: the type of the compaction task.

        • MDS_TABLE_MERGE: persists the system metadata to disk in the format of an SSTable.
        • MAJOR_MERGE: tenant-level compaction.
        • MEDIUM_MERGE: partition-level compaction.
        • MINI_MERGE: mini compaction. It converts the MemTable into a mini SSTable.
        • MINOR_MERGE: minor compaction. It combines multiple mini SSTables into one new mini SSTable, or combines multiple mini SSTables and one minor SSTable into one new minor SSTable.
        • META_MAJOR_MERGE: a special type of compaction. It combines data before a specified point in time into one meta major SSTable. The data format of this SSTable is the same as that of a major SSTable, but it does not contain multi-version data or uncommitted transaction data.
      • STATUS: the status of the task. When the task is running, the value of this column is NODE_RUNNING.

      • DATA_SIZE: the total amount of data to be compacted.

      • UNFINISHED_DATA_SIZE: the amount of data that remains to be compacted.

      • ESTIMATED_FINISH_TIME: the expected completion time.

      For more information about the columns in the GV$OB_TABLET_COMPACTION_PROGRESS view, see GV$OB_TABLET_COMPACTION_PROGRESS.

      If a tablet is not displayed in the view or has been compacting for a long time, you can view the GV$OB_COMPACTION_DIAGNOSE_INFO diagnostic view for further investigation.

      For more information about the columns in the GV$OB_COMPACTION_DIAGNOSE_INFO view, see GV$OB_COMPACTION_DIAGNOSE_INFO.

    View compaction history

    1. Log in to the sys tenant or user tenant of the cluster as the tenant administrator.

    2. View the compaction history.

      The GV$OB_TABLET_COMPACTION_HISTORY view displays the history of tablet-level compactions. You can execute the following statements to query the information:

      • View the compaction history in the sys tenant

        obclient> SELECT * FROM oceanbase.GV$OB_TABLET_COMPACTION_HISTORY WHERE TYPE='MINI_MERGE'\G
        
      • View the compaction history in a user tenant

        • MySQL mode

          obclient> SELECT * FROM oceanbase.GV$OB_TABLET_COMPACTION_HISTORY WHERE TYPE='MINI_MERGE'\G
          
        • Oracle mode

          obclient> SELECT * FROM SYS.GV$OB_TABLET_COMPACTION_HISTORY WHERE TYPE='MINI_MERGE'\G
          

      Here is the sample result:

      *************************** 1. row ***************************
                                     SVR_IP: 11.xxx.xxx.xx
                                   SVR_PORT: 13847
                                  TENANT_ID: 1002
                                      LS_ID: 1001
                                  TABLET_ID: 201770
                                       TYPE: MINI_MERGE
                             COMPACTION_SCN: 1745921690220646000
                                 START_TIME: 2025-04-29 19:46:48.326791
                                FINISH_TIME: 2025-04-29 19:46:48.344048
                                    TASK_ID: Y36170BA2D939-000624702D74513B-0-0
                                OCCUPY_SIZE: 6395
                          MACRO_BLOCK_COUNT: 1
              MULTIPLEXED_MACRO_BLOCK_COUNT: 0
               NEW_MICRO_COUNT_IN_NEW_MACRO: 1
       MULTIPLEXED_MICRO_COUNT_IN_NEW_MACRO: 0
                            TOTAL_ROW_COUNT: 10
                      INCREMENTAL_ROW_COUNT: 10
                          COMPRESSION_RATIO: 0.96
                        NEW_FLUSH_DATA_RATE: 2046
               PROGRESSIVE_COMPACTION_ROUND: 0
                 PROGRESSIVE_COMPACTION_NUM: 0
                            PARALLEL_DEGREE: 1
                              PARALLEL_INFO: -
                          PARTICIPANT_TABLE: table_cnt=1,start_scn=1,end_scn=1745921690220646000;
                              MACRO_ID_LIST: 25745
                                   COMMENTS: comment="block_io_us=232;cost_mb=2;time=add_time:1745927208325419|total=18.17ms;";
                                START_CG_ID: 0
                                  END_CG_ID: 0
                              KEPT_SNAPSHOT: {type:"SNAPSHOT_ON_TABLET", snapshot:1745863202001499000}
                                MERGE_LEVEL: MACRO_BLOCK_LEVEL
      1 row in set
      

      For more information about the fields in the GV$OB_TABLET_COMPACTION_HISTORY view, see GV$OB_TABLET_COMPACTION_HISTORY.

    Previous topic

    Manually initiate a minor compaction
    Last

    Next topic

    Modify major compaction parameters
    Next
    What is on this page
    View the progress of a minor compaction
    View compaction history