Note
This view is available starting with V4.0.0.
Purpose
This view displays the global major compaction information of all tenants under the sys tenant.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | The tenant ID. |
| 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 global broadcast version of the 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 major compaction information. For example, the cause of 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 all tenants under the sys tenant.
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
Query the global major compaction information of all tenants in each zone: CDB_OB_ZONE_MAJOR_COMPACTION
Query the basic statistics of major compactions at the tablet level:
Query the detailed historical information of major compactions at the tablet level:
For information about operations related to major compactions, see the following topics:
