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 ended. |
| 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 error occurred during the major compaction. |
| IS_SUSPENDED | varchar(3) | NO | YES: The major compaction is paused.NO: The major compaction is not paused. |
| INFO | varchar(14) | NO | The compaction information. For example, the reason for the compaction failure. |
Sample query
Query the major compaction information of the current user 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 |
+---------------------+----------------------------+----------------------+---------------------+----------------------------+----------------------------+--------+----------+--------------+------+
| 1736359203243332000 | 2025-01-09 02:00:03.243332 | 1736359203243332000 | 1736359203243332000 | 2025-01-09 02:02:26.912138 | 2025-01-09 02:00:03.270335 | IDLE | NO | NO | |
+---------------------+----------------------------+----------------------+---------------------+----------------------------+----------------------------+--------+----------+--------------+------+
1 row in set
References
Query the global compaction information of the current tenant: DBA_OB_ZONE_MAJOR_COMPACTION
Query the detailed historical information about tablet-level major compactions:
For information about major compaction operations, see the following topics: