Note
This view is available starting with V4.0.0.
Purpose
This view displays the compaction progress of 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 the compaction. Valid values:
|
| ZONE | varchar(128) | NO | The zone information. |
| COMPACTION_SCN | bigint(20) unsigned | NO | The compaction version. |
| STATUS | varchar(10) | NO | The status. |
| TOTAL_TABLET_CNT | bigint(20) | NO | The total number of tablets. |
| UNFINISHED_TABLET_CNT | bigint(20) | NO | The number of tablets that have not been compacted. |
| DATA_SIZE | bigint(20) | NO | The total data size to be scanned. |
| UNFINISHED_DATA_SIZE | bigint(20) | NO | The data size that has not been scanned. |
| COMPRESSION_RATIO | bigint(20) | NO | The compression ratio of the new data. This value is recorded only for data written after the last major version point. |
| START_TIME | timestamp(6) | NO | The start time. |
| ESTIMATED_FINISH_TIME | timestamp(6) | NO | The estimated finish time. If the compaction progress reaches 100%, the end time is displayed. |
| COMMENTS | varchar(256) | NO | The comment. During the compaction, the latest compaction event is recorded. After the compaction is completed, the overall duration is recorded. |
Sample query
Query the compaction progress of the current tenant on the current OBServer node.
obclient [oceanbase]> SELECT * FROM oceanbase.V$OB_COMPACTION_PROGRESS;
The query result is as follows:
+----------------+----------+-----------+-------------+-------+---------------------+--------+--------------------+-------------------------+-----------+----------------------+-------------------+----------------------------+----------------------------+----------------+
| SVR_IP | SVR_PORT | TENANT_ID | TYPE | ZONE | COMPACTION_SCN | STATUS | TOTAL_TABLET_COUNT | UNFINISHED_TABLET_COUNT | DATA_SIZE | UNFINISHED_DATA_SIZE | COMPRESSION_RATIO | START_TIME | ESTIMATED_FINISH_TIME | COMMENTS |
+----------------+----------+-----------+-------------+-------+---------------------+--------+--------------------+-------------------------+-----------+----------------------+-------------------+----------------------------+----------------------------+----------------+
| 172.xx.xxx.xxx | 2882 | 1002 | MAJOR_MERGE | zone1 | 1735668000499972000 | FINISH | 3 | 0 | 0 | 0 | 1 | 2025-01-01 02:00:02.047807 | 2025-01-01 02:03:28.380519 | total=14.70ms; |
| 172.xx.xxx.xxx | 2882 | 1002 | MAJOR_MERGE | zone1 | 1735754402003130000 | FINISH | 3 | 0 | 0 | 0 | 1 | 2025-01-02 02:00:04.119302 | 2025-01-02 02:03:31.626016 | total=9.92ms; |
+----------------+----------+-----------+-------------+-------+---------------------+--------+--------------------+-------------------------+-----------+----------------------+-------------------+----------------------------+----------------------------+----------------+
2 rows in set