Note
This view is available starting with V4.0.0.
Purpose
This view displays the global compaction information of the current tenant.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| FROZEN_SCN | bigint(20) unsigned | NO | The version number of the last major compaction. |
| FROZEN_TIME | timestamp(6) | NO | The time when the last major compaction was initiated (FROZEN_SCN is displayed in a readable format). |
| GLOBAL_BROADCAST_SCN | bigint(20) unsigned | NO | The version number of the global broadcast major compaction. |
| LAST_SCN | bigint(20) unsigned | NO | The version number of the last completed major compaction. |
| LAST_FINISH_TIME | timestamp(6) | NO | The time when the last major compaction was completed. |
| START_TIME | timestamp(6) | NO | The time when the major compaction started. |
| STATUS | varchar(10) | NO | IDLE: No major compaction is in progress.COMPACTING: A major compaction is in progress.CHECKSUM: Checksum verification is in progress. |
| IS_ERROR | varchar(3) | NO | YES: An error occurred during the major compaction.NO: No errors occurred during the major compaction. |
| IS_SUSPENDED | varchar(3) | NO | YES: The major compaction is suspended.NO: The major compaction is not suspended. |
| INFO | varchar(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 sys tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_MAJOR_COMPACTION;
The query result is as follows:
+---------------------+----------------------------+----------------------+---------------------+----------------------------+----------------------------+--------+----------+--------------+------+
| FROZEN_SCN | FROZEN_TIME | GLOBAL_BROADCAST_SCN | LAST_SCN | LAST_FINISH_TIME | START_TIME | STATUS | IS_ERROR | IS_SUSPENDED | INFO |
+---------------------+----------------------------+----------------------+---------------------+----------------------------+----------------------------+--------+----------+--------------+------+
| 1736359201793995000 | 2025-01-09 02:00:01.793995 | 1736359201793995000 | 1736359201793995000 | 2025-01-09 02:05:56.738721 | 2025-01-09 02:00:01.822737 | IDLE | NO | NO | |
+---------------------+----------------------------+----------------------+---------------------+----------------------------+----------------------------+--------+----------+--------------+------+
1 row in set
References
Query the global compaction information of the current tenant: DBA_OB_ZONE_MAJOR_COMPACTION
Query the basic statistics of major compactions at the tablet level:
Query the detailed historical information about major compactions at the tablet level:
For information about major compaction operations, see the following topics: