Note
This view is available starting with V4.0.0.
Purpose
This view displays the progress of tablet-level compactions for all tenants 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:
|
| TABLE_ID | bigint(20) | NO | The ID of the main table. |
| LS_ID | bigint(20) | NO | The log stream ID. |
| TABLET_ID | bigint(20) | NO | The ID of the data tablet. |
| COMPACTION_SCN | bigint(20) unsigned | NO | The compaction version information. |
| TASK_ID | varchar(64) | NO | The trace of the executed task. |
| STATUS | varchar(15) | NO | The task status. |
| DATA_SIZE | bigint(20) | NO | The total data size to be compacted, in bytes. |
| UNFINISHED_DATA_SIZE | bigint(20) | NO | The data size that has not been compacted, in bytes. |
| 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 finish time. |
| START_CG_ID | bigint(20) | NO | The start ID of the column group.
NoteThis column is available starting with V4.3.0. |
| END_CG_ID | bigint(20) | NO | The end ID of the column group.
NoteThis column is available starting with V4.3.0. |
Sample query
Query the progress of MAJOR_MERGE compactions for tenant 1002 in the system tenant on the current node.
obclient [oceanbase]> SELECT * FROM ocenbase.V$OB_TABLET_COMPACTION_PROGRESS WHERE TENANT_ID=1002 AND 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
