Note
This view is available starting with V4.0.0.
Purpose
This view displays the global major 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 end time of the last major compaction. |
| START_TIME | timestamp(6) | NO | The start time of the major compaction. |
| STATUS | varchar(10) | NO |
|
| IS_ERROR | varchar(3) | NO |
|
| IS_SUSPENDED | varchar(3) | NO |
|
| INFO | varchar(14) | NO | The information about the major compaction. For example, the reason for the major compaction failure. |
| MODE | varchar(7) | NO | The type of daily major compaction:
NoteThis column is available starting with V4.6.0. |
Sample query
Query the global major compaction information of the sys tenant.
obclient(root@sys)[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 | MODE |
+---------------------+----------------------------+----------------------+---------------------+----------------------------+----------------------------+--------+----------+--------------+------+--------+
| 1773079200622919000 | 2026-03-10 02:00:00.622919 | 1773079200622919000 | 1773079200622919000 | 2026-03-10 02:04:11.869858 | 2026-03-10 02:00:00.761885 | IDLE | NO | NO | | TENANT |
+---------------------+----------------------------+----------------------+---------------------+----------------------------+----------------------------+--------+----------+--------------+------+--------+
1 row in set
References
Query the major compaction information of each zone 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 operations related to major compactions, see the following topics:
