Overview
The system tenant displays the global major compaction information for all tenants.
Columns
Field Name |
Type |
Whether can be NULL |
Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | Tenant ID |
| FROZEN_SCN | bigint(20) unsigned | NO | Version number of the most recent major compaction |
| FROZEN_TIME | timestamp(6) | NO | Time when the last major compaction was initiated (displayed in a readable format). |
| GLOBAL_BROADCAST_SCN | bigint(20) unsigned | NO | Global Broadcast Major Compaction Version |
| LAST_SCN | bigint(20) unsigned | NO | The last version for which major compaction is completed |
| 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 |
|
| IS_ERROR | varchar(3) | NO |
|
| IS_SUSPENDED | varchar(3) | NO |
|
| INFO | varchar(14) | NO | Displays the major compaction information. For example, the cause of the major compaction failure. |
| MODE | varchar(7) | NO | Type of daily major compaction:
|
Sample query
The sys tenant queries the global major compaction information of all tenants.
obclient(root@sys)[oceanbase]> SELECT * FROM oceanbase.CDB_OB_MAJOR_COMPACTION;
The query result is as follows:
+-----------+---------------------+----------------------------+----------------------+---------------------+----------------------------+----------------------------+--------+----------+--------------+------+--------+
| TENANT_ID | FROZEN_SCN | FROZEN_TIME | GLOBAL_BROADCAST_SCN | LAST_SCN | LAST_FINISH_TIME | START_TIME | STATUS | IS_ERROR | IS_SUSPENDED | INFO | MODE |
+-----------+---------------------+----------------------------+----------------------+---------------------+----------------------------+----------------------------+--------+----------+--------------+------+--------+
| 1 | 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 |
| 1001 | 1773079200659792000 | 2026-03-10 02:00:00.659792 | 1773079200659792000 | 1773079200659792000 | 2026-03-10 02:06:02.436787 | 2026-03-10 02:00:00.687285 | IDLE | NO | NO | | TENANT |
| 1002 | 1772992801519693000 | 2026-03-09 02:00:01.519693 | 1772992801519693000 | 1772992801519693000 | 2026-03-09 02:05:42.538179 | 2026-03-09 16:15:11.214954 | IDLE | NO | NO | | WINDOW |
| 1003 | 1773079201393261000 | 2026-03-10 02:00:01.393261 | 1773079201393261000 | 1773079201393261000 | 2026-03-10 02:05:53.062461 | 2026-03-10 02:00:01.450419 | IDLE | NO | NO | | TENANT |
| 1004 | 1772647200462679000 | 2026-03-05 02:00:00.462679 | 1772647200462679000 | 1772647200462679000 | 2026-03-05 02:05:31.394359 | 2026-03-09 17:47:22.612055 | IDLE | NO | NO | | WINDOW |
+-----------+---------------------+----------------------------+----------------------+---------------------+----------------------------+----------------------------+--------+----------+--------------+------+--------+
5 rows in set
References
View major compaction information for all zones of all tenants: CDB_OB_ZONE_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: