Note
This view is introduced in OceanBase Database V4.0.0.
Purpose
This view displays the progress of tablet-level compactions for the current tenant on the current node.
Columns
| Field | Type | Nullable | Description |
|---|---|---|---|
| SVR_IP | VARCHAR2(46) | NO | The IP address of the server. |
| SVR_PORT | NUMBER(38) | NO | The port number of the server. |
| TENANT_ID | NUMBER(38) | NO | The tenant ID. |
| TYPE | VARCHAR2(64) | NO | The type of compaction. Valid values:
|
| LS_ID | NUMBER(38) | NO | The log stream ID. |
| TABLET_ID | NUMBER(38) | NO | The data shard ID. |
| COMPACTION_SCN | NUMBER(38) | NO | The compaction version information. |
| TASK_ID | VARCHAR2(64) | NO | The trace ID of the task. |
| STATUS | VARCHAR2(15) | NO | The task status. |
| DATA_SIZE | NUMBER(38) | NO | The total amount of data to be scanned. |
| UNFINISHED_DATA_SIZE | NUMBER(38) | NO | The amount of unscanned data. |
| PROGRESSIVE_COMPACTION_ROUND | NUMBER(38) | NO | The progressive compaction round. |
| CREATE_TIME | TIMESTAMP(6) WITH LOCAL TIME ZONE | NO | The task creation time. |
| START_TIME | TIMESTAMP(6) WITH LOCAL TIME ZONE | NO | The start time. |
| ESTIMATED_FINISH_TIME | TIMESTAMP(6) WITH LOCAL TIME ZONE | NO | The estimated finish time. |
| START_CG_ID | NUMBER(38) | NO | The start ID of the column group.
NoteThis field is introduced in OceanBase Database V4.3.0. |
| END_CG_ID | NUMBER(38) | NO | The end ID of the column group.
NoteThis field is introduced in OceanBase Database V4.3.0. |
Sample query
A user tenant queries the progress of compactions of type MAJOR_MERGE on the current node.
obclient [oceanbase]> SELECT * FROM SYS.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 | 1004 | 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