Overview
Displays the major compaction progress information of all tenants on the current node.
Columns
Field Name |
Type |
Whether can be NULL |
Description |
|---|---|---|---|
| SVR_IP | varchar(46) | NO | Server IP |
| SVR_PORT | bigint(20) | NO | Server Port Number |
| TENANT_ID | bigint(20) | NO | Tenant ID |
| TYPE | varchar(64) | NO | Types of compaction.
|
| ZONE | varchar(128) | NO | Zone Information |
| COMPACTION_SCN | bigint(20) unsigned | NO | Major compaction version information |
| STATUS | varchar(10) | NO | Status Information |
| TOTAL_TABLET_CNT | bigint(20) | NO | Total Tablets |
| UNFINISHED_TABLET_CNT | bigint(20) | NO | Number of Tablets Not Completed |
| DATA_SIZE | bigint(20) | NO | Total data volume requiring compaction, in bytes |
| UNFINISHED_DATA_SIZE | bigint(20) | NO | Data volume of unfinished major compaction, in bytes |
| COMPRESSION_RATIO | bigint(20) | NO | Compression Ratio of New Data (Records only the compression ratio of newly written data after the last major version point.) |
| START_TIME | timestamp(6) | NO | Start Time |
| ESTIMATED_FINISH_TIME | timestamp(6) | NO | Estimated completion time (if |
| NO | If compaction_progress is 100, the end time is displayed.) | ||
| COMMENTS | varchar(1024) | NO | Comment information. During a major compaction, it records the latest compaction events. After the major compaction is complete, it records the overall duration. |
Sample query
The system tenant queries the major compaction progress information of all tenants on the current node and displays the first 5 records.
obclient [oceanbase]> SELECT * FROM oceanbase.V$OB_COMPACTION_PROGRESS LIMIT 5;
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 | 1 | MAJOR_MERGE | zone1 | 1735668001977989000 | FINISH | 998 | 0 | 52950720 | 0 | 1 | 2025-01-01 02:00:03.437780 | 2025-01-01 02:06:08.668990 | EXECUTE=2.77s|(0.40)|UPDATE_TABLET=3.65s|(0.53)|total=6.91s; |
| 172.xx.xxx.xxx | 2882 | 1 | MAJOR_MERGE | zone1 | 1735754403442116000 | FINISH | 998 | 0 | 383450742 | 0 | 1 | 2025-01-02 02:00:05.586452 | 2025-01-02 02:04:40.953585 | EXECUTE=4.27s|(0.48)|UPDATE_TABLET=4.08s|(0.46)|total=8.87s; |
| 172.xx.xxx.xxx | 2882 | 1001 | MAJOR_MERGE | zone1 | 1735668001678185000 | FINISH | 0 | 0 | 0 | 0 | 1 | 2025-01-01 02:00:03.771773 | 2025-01-01 02:01:27.731708 | total=0us; |
| 172.xx.xxx.xxx | 2882 | 1001 | MAJOR_MERGE | zone1 | 1735754403233853000 | FINISH | 0 | 0 | 0 | 0 | 1 | 2025-01-02 02:00:04.882274 | 2025-01-02 02:01:28.675352 | total=0us; |
| 172.xx.xxx.xxx | 2882 | 1001 | MAJOR_MERGE | zone1 | 1735840804806112001 | FINISH | 0 | 0 | 0 | 0 | 1 | 2025-01-03 02:00:07.804602 | 2025-01-03 02:01:29.610499 | total=0us; |
+----------------+----------+-----------+-------------+-------+---------------------+--------+--------------------+-------------------------+-----------+----------------------+-------------------+----------------------------+----------------------------+--------------------------------------------------------------+
5 rows in set