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 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
    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 Database
    3. SQL
    4. V4.2.5
    iconOceanBase Database
    SQL - V 4.2.5
    SQL
    KV
    • 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

    DBA_OB_MAJOR_COMPACTION

    Last Updated:2026-04-15 08:24:15  Updated
    share
    What is on this page
    Columns
    Sample query
    References

    folded

    share

    Note

    This view is available starting with V4.0.0.

    This view displays the global information of major compactions in the current tenant.

    Columns

    Column Type Nullable Description
    FROZEN_SCN NUMBER(38) NO The version number of the last major compaction.
    GLOBAL_BROADCAST_SCN NUMBER(38) NO The version number of the global broadcast major compaction.
    LAST_SCN NUMBER(38) NO The version number of the last major compaction that was completed.
    LAST_FINISH_TIME NUMBER(38) NO The end time of the last major compaction.
    START_TIME NUMBER(38) NO The start time of the major compaction.
    STATUS VARCHAR2(10) NO
  • IDLE: No major compaction is in progress.
  • COMPACTING: A major compaction is in progress.
  • CHECKSUM: Checksum verification is in progress.
  • IS_ERROR VARCHAR2(3) NO
  • YES: An error occurred during the major compaction.
  • NO: No error occurred during the major compaction.
  • IS_SUSPENDED VARCHAR2(3) NO
  • YES: The major compaction is suspended.
  • NO: The major compaction is not suspended.
  • INFO VARCHAR2(14) NO The information about the major compaction. For example, the reason why the major compaction failed.

    Sample query

    Query the major compaction information of the current user tenant.

    obclient [SYS]> SELECT * FROM SYS.DBA_OB_MAJOR_COMPACTION;
    

    The query result is as follows:

    +---------------------+----------------------+---------------------+------------------+------------------+--------+----------+--------------+------+
    | FROZEN_SCN          | GLOBAL_BROADCAST_SCN | LAST_SCN            | LAST_FINISH_TIME | START_TIME       | STATUS | IS_ERROR | IS_SUSPENDED | INFO |
    +---------------------+----------------------+---------------------+------------------+------------------+--------+----------+--------------+------+
    | 1736359202149291000 |  1736359202149291000 | 1736359202149291000 | 1736359425486421 | 1736359202174093 | IDLE   | NO       | NO           | NULL |
    +---------------------+----------------------+---------------------+------------------+------------------+--------+----------+--------------+------+
    1 row in set
    

    References

    • Query the global information of major compactions in the current tenant: DBA_OB_ZONE_MAJOR_COMPACTION

    • Query the detailed historical information of major compactions at the tablet level:

      • GV$OB_TABLET_COMPACTION_HISTORY
      • V$OB_TABLET_COMPACTION_HISTORY
    • For more information about major compactions, see the following topics:

      • Automatic major compaction triggering

      • Scheduled major compaction triggering

      • Adaptive major compaction

      • Manually trigger a major compaction

      • Manually control a major compaction

      • View the major compaction information

    Previous topic

    DBA_TAB_COL_STATISTICS
    Last

    Next topic

    DBA_TAB_HISTOGRAMS
    Next
    What is on this page
    Columns
    Sample query
    References