Note
This view is introduced in V4.0.0.
Purpose
This view displays the progress information of tablet-level compaction in the current tenant on the current node.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| SVR_IP | varchar(46) | NO | The IP address of the server. |
| SVR_PORT | bigint(20) | NO | The port number of the server. |
| TENANT_ID | bigint(20) | NO | The tenant ID. |
| TYPE | varchar(64) | NO | The type of compaction. Valid values:
|
| TABLE_ID | bigint(20) | NO | The ID of the primary table. |
| LS_ID | bigint(20) | NO | The ID of the log stream. |
| TABLET_ID | bigint(20) | NO | The ID of the data shard. |
| COMPACTION_SCN | bigint(20) unsigned | NO | The version information of the compaction. |
| TASK_ID | varchar(64) | NO | The ID of the executed trace. |
| STATUS | varchar(15) | NO | The task status. |
| DATA_SIZE | bigint(20) | NO | The total amount of data to be scanned. |
| UNFINISHED_DATA_SIZE | bigint(20) | NO | The amount of unscanned data. |
| PROGRESSIVE_COMPACTION_ROUND | bigint(20) | NO | The number of progressive compaction rounds. |
| CREATE_TIME | timestamp(6) | NO | The task creation time. |
| START_TIME | timestamp(6) | NO | The start time. |
| ESTIMATED_FINISH_TIME | timestamp(6) | NO | The estimated completion time. |
| START_CG_ID | bigint(20) | NO | The start ID of the Column Group.
NoteThis field is introduced in V4.3.0. |
| END_CG_ID | bigint(20) | NO | The end ID of the Column Group.
NoteThis field is introduced in V4.3.0. |
Sample query
A user tenant queries the progress of a major compaction on the current node.
obclient [oceanbase]> SELECT * FROM oceanbase.V$OB_TABLET_COMPACTION_PROGRESS WHERE TYPE='MAJOR_MERGE'\G
The query result is as follows:
+----------------+----------+-----------+-------------+-------+-----------+---------------------+-----------------------------------+--------------+-----------+----------------------+------------------------------+----------------------------+----------------------------+----------------------------+-------------+-----------+
| SVR_IP | SVR_PORT | TENANT_ID | TYPE | LS_ID | TABLET_ID | COMPACTION_SCN | TASK_ID | STATUS | DATA_SIZE | UNFINISHED_DATA_SIZE | PROGRESSIVE_COMPACTION_ROUND | CREATE_TIME | START_TIME | ESTIMATED_FINISH_TIME | START_CG_ID | END_CG_ID |
+----------------+----------+-----------+-------------+-------+-----------+---------------------+-----------------------------------+--------------+-----------+----------------------+------------------------------+----------------------------+----------------------------+----------------------------+-------------+-----------+
| 172.xx.xxx.xxx | 2882 | 1002 | MAJOR_MERGE | 1 | 101067 | 1751867181650640000 | YB42AC1E87D9-00063837DA7854C4-0-0 | NODE_RUNNING | 21475 | 21475 | 1 | 2025-07-07 13:49:33.233901 | 2025-07-07 13:49:33.233998 | 2025-07-07 13:49:50.234508 | 0 | 0 |
+----------------+----------+-----------+-------------+-------+-----------+---------------------+-----------------------------------+--------------+-----------+----------------------+------------------------------+----------------------------+----------------------------+----------------------------+-------------+-----------+
1 row in set