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

    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.3.0
    iconOceanBase Database
    SQL - V 4.3.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_TABLET_COMPACTION_HISTORY

    Last Updated:2026-04-15 08:30:02  Updated
    Share
    What is on this page
    Description
    Field descriptions
    Examples
    References

    folded

    Share

    Note

    Introduced in MySQL 4.0.0.

    Description

    The V$OB_TABLET_COMPACTION_HISTORY view displays the historical information about tablet-level major compactions.

    Field descriptions

    Field name
    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.
    TENANT_ID NUMBER(38) NO The ID of the tenant.
    LS_ID NUMBER(38) NO The ID of the log stream.
    TABLET_ID NUMBER(38) NO The ID of the data shard.
    TYPE VARCHAR2(64) NO The type of the compaction. The possible values are as follows:
    • MDS_TABLE_MERGE: The system metadata is persisted to the disk in the SSTable format.
    • MAJOR_MERGE: A tenant-level major compaction.
    • MEDIUM_MERGE: A partition-level major compaction.
    • MINI_MERGE: A mini compaction. MemTables are transformed into a mini SSTable.
    • MINOR_MERGE: A minor compaction. Multiple mini SSTables are merged into one mini SSTable, or a minor SSTable is merged with one or more mini SSTables into a new minor SSTable.
    • META_MAJOR_MERGE: A special type of compaction. It synthesizes data from the start of the time period specified to the current time into a Meta Major SSTable. The data in the Meta Major SSTable has the same format as that in a Major SSTable, but does not contain multi-version data or uncommitted transactions.
    COMPACTION_SCN NUMBER(38) NO The version number of the compaction. For minor compactions, this value is the snapshot version.
    START_TIME TIMESTAMP(6) WITH LOCAL TIME ZONE NO The start time.
    FINISH_TIME TIMESTAMP(6) WITH LOCAL TIME ZONE NO The end time.
    OCCUPY_SIZE NUMBER(38) NO The amount of data.
    MACRO_BLOCK_COUNT NUMBER(38) NO The number of macroblocks.
    MULTIPLEXED_MACRO_BLOCK_COUNT NUMBER(38) NO The number of reused macroblocks.
    NEW_MICRO_COUNT_IN_NEW_MACRO NUMBER(38) NO The number of new microblocks in a new macroblock.
    MULTIPLEXED_MICRO_COUNT_IN_NEW_MACRO NUMBER(38) NO The number of reused microblocks in a new macroblock.
    TOTAL_ROW_COUNT NUMBER(38) NO The total number of rows.
    INCREMENTAL_ROW_COUNT NUMBER(38) NO The number of new output rows.
    COMPRESSION_RATIO NUMBER(38) NO The compression ratio of new data: the ratio of the size of the compressed data to the size of the uncompressed data in the new macroblock.
    PROGRESSIVE_COMPACTION_ROUND NUMBER(38) NO The current round of progressive compaction. If this is a full compaction, the value of this field is -1.
    PROGRESSIVE_COMPACTION_NUM NUMBER(38) NO The total number of rounds of progressive compaction.
    PARALLEL_DEGREE NUMBER(38) NO The degree of parallelism.
    PARALLEL_INFO VARCHAR2(512) NO Information about parallel tasks. This displays the statistics (minimum value, maximum value, and average value) of the data scanned, runtime, and data output for each parallel task.
    MACRO_ID_LIST varchar2(256) NO The list of macroblocks. If the list is too long, it is not displayed.
    COMMENTS varchar2(256) NO Records the history of failed compactions and the time consumption of the current compaction.
    START_CG_ID NUMBER(38) NO The start ID of the column group

    Note

    This field is introduced in V4.3.0.

    END_CG_ID NUMBER(38) NO The end ID of the column group

    Note

    This field is introduced in V4.3.0.

    KEPT_SNAPSHOT VARCHAR2(128) NO The information about the multi-version sites retained in this compaction

    Note

    This field is introduced in V4.3.0.

    MERGE_LEVEL VARCHAR2(64) NO Specifies whether a major compaction or macroblock reuse is performed during the compaction.

    Note

    This field is introduced in V4.3.0.

    Examples

    A user queries the historical information about minor compactions at the tablet level on this OBServer node.

    obclient [SYS]> SELECT * FROM SYS.V$OB_TABLET_COMPACTION_HISTORY WHERE ROWNUM = 1\G
    

    The query result is as follows:

    *************************** 1. row ***************************
                                  SVR_IP: 172.xx.xx.xx
                                SVR_PORT: 2882
                               TENANT_ID: 1004
                                   LS_ID: 1
                               TABLET_ID: 60379
                                    TYPE: MAJOR_MERGE
                          COMPACTION_SCN: 1722880804392106676
                              START_TIME: 06-AUG-24 02.00.49.532794 AM
                             FINISH_TIME: 06-AUG-24 02.00.49.540051 AM
                                 TASK_ID: YB4XXXXXXXXX-000XXXXXXXXXXXXX-0-0
                             OCCUPY_SIZE: 0
                       MACRO_BLOCK_COUNT: 0
           MULTIPLEXED_MACRO_BLOCK_COUNT: 0
            NEW_MICRO_COUNT_IN_NEW_MACRO: 0
    MULTIPLEXED_MICRO_COUNT_IN_NEW_MACRO: 0
                         TOTAL_ROW_COUNT: 0
                   INCREMENTAL_ROW_COUNT: 0
                       COMPRESSION_RATIO: 1
                     NEW_FLUSH_DATA_RATE: 0
            PROGRESSIVE_COMPACTION_ROUND: 1
              PROGRESSIVE_COMPACTION_NUM: 0
                         PARALLEL_DEGREE: 1
                           PARALLEL_INFO: -
                       PARTICIPANT_TABLE: table_cnt=1,[MAJOR]snapshot_version=1;
                           MACRO_ID_LIST: NULL
                                COMMENTS: comment="merge_reason="TENANT_MAJOR";time=add_time:1722880849532694|total=7.26ms;";
                             START_CG_ID: 0
                               END_CG_ID: 0
                           KEPT_SNAPSHOT: NULL
                             MERGE_LEVEL: NULL
    1 row in set
    

    References

    • GV$OB_TABLET_COMPACTION_HISTORY

    • V$OB_TABLET_COMPACTION_PROGRESS

    • View dump information

    • View major compaction information

    Previous topic

    V$OB_PX_TARGET_MONITOR
    Last

    Next topic

    V$OB_TABLET_COMPACTION_PROGRESS
    Next
    What is on this page
    Description
    Field descriptions
    Examples
    References