Overview
The system tenant displays the major compaction information for each zone of all tenants.
Columns
Field Name |
Type |
Whether can be NULL |
Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | Tenant ID |
| ZONE | varchar(128) | NO | Zone Name |
| BROADCAST_SCN | bigint(20) unsigned | NO | Broadcast Major Compaction Version Number |
| LAST_SCN | bigint(20) unsigned | NO | The version number of the last major compaction |
| LAST_FINISH_TIME | timestamp(6) | NO | Last Major Compaction End Time |
| START_TIME | timestamp(6) | NO | Start Time of Major Compaction |
| STATUS | varchar(10) | NO |
|
Sample query
The sys tenant can view the major compaction information of each zone for all tenants.
obclient> SELECT * FROM oceanbase.CDB_OB_ZONE_MAJOR_COMPACTION;
The query result is as follows:
+-----------+-------+---------------------+---------------------+----------------------------+----------------------------+--------+
| TENANT_ID | ZONE | BROADCAST_SCN | LAST_SCN | LAST_FINISH_TIME | START_TIME | STATUS |
+-----------+-------+---------------------+---------------------+----------------------------+----------------------------+--------+
| 1 | zone1 | 1748368801021617000 | 1748368801021617000 | 2025-05-28 02:04:15.351286 | 2025-05-28 02:00:01.051592 | IDLE |
| 1001 | zone1 | 1748368802924607000 | 1748368802924607000 | 2025-05-28 02:02:16.412661 | 2025-05-28 02:00:02.965810 | IDLE |
| 1002 | zone1 | 1748368802035321000 | 1748368802035321000 | 2025-05-28 02:03:25.019173 | 2025-05-28 02:00:02.090687 | IDLE |
| 1003 | zone1 | 1748368802977311000 | 1748368802977311000 | 2025-05-28 02:02:46.565036 | 2025-05-28 02:00:03.009192 | IDLE |
| 1004 | zone1 | 1748368801786323000 | 1748368801786323000 | 2025-05-28 02:03:54.629630 | 2025-05-28 02:00:01.820863 | IDLE |
+-----------+-------+---------------------+---------------------+----------------------------+----------------------------+--------+
5 rows in set
References
View global major compaction information for all tenants: CDB_OB_MAJOR_COMPACTION
View basic statistics on tablet-level major compactions:
View detailed historical information on tablet-level major compactions:
For more information about major compaction, see the following topics: