Note
This view is available starting with V4.0.0.
Purpose
This view displays the compaction information of each zone in the current tenant.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| ZONE | varchar(128) | NO | The name of the zone. |
| BROADCAST_SCN | bigint(20) unsigned | NO | The version number of the broadcasted major compaction. |
| LAST_SCN | bigint(20) unsigned | NO | The version number of the last 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 |
|
Sample query
Query the compaction information of each zone in the current user tenant.
obclient> SELECT * FROM oceanbase.DBA_OB_ZONE_MAJOR_COMPACTION;
The query result is as follows:
+-------+---------------------+---------------------+----------------------------+----------------------------+--------+
| ZONE | BROADCAST_SCN | LAST_SCN | LAST_FINISH_TIME | START_TIME | STATUS |
+-------+---------------------+---------------------+----------------------------+----------------------------+--------+
| zone1 | 1748455203748142000 | 1748455203748142000 | 2025-05-29 02:05:55.879349 | 2025-05-29 02:00:03.782431 | IDLE |
+-------+---------------------+---------------------+----------------------------+----------------------------+--------+
1 row in set
References
Query the global compaction information of the current tenant: DBA_OB_MAJOR_COMPACTION
Query the detailed historical information of major compactions at the tablet level:
For information about operations related to major compactions, see the following topics: