Note
This view is introduced since OceanBase Database V4.0.0.
Purpose
The V$OB_COMPACTION_PROGRESS view displays the progress of OBServer node-level compactions in the current tenant.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| SVR_IP | VARCHAR2(46) | NO | The IP address of the OBServer node. |
| SVR_PORT | NUMBER(38) | NO | The port number of the OBServer node. |
| TENANT_ID | NUMBER(38) | NO | The ID of the tenant. |
| TYPE | VARCHAR2(64) | NO | The compaction type. Valid values:
|
| ZONE | VARCHAR2(128) | NO | The zone. |
| COMPACTION_SCN | NUMBER(38) | NO | Information about the minor compaction version |
| STATUS | VARCHAR2(15) | NO | The status information. |
| TOTAL_TABLET_COUNT | NUMBER(38) | NO | The total number of tablets. |
| UNFINISHED_TABLET_COUNT | NUMBER(38) | NO | The number of unfinished tablets. |
| DATA_SIZE | NUMBER(38) | NO | The total amount of data to be scanned, in bytes. |
| UNFINISHED_DATA_SIZE | NUMBER(38) | NO | The amount of data that is not yet required to be scanned, in bytes. |
| COMPRESSION_RATIO | NUMBER(38) | NO | The compression ratio of the data that has been written since the last major compaction version. |
| START_TIME | TIMESTAMP(6) WITH LOCAL TIME ZONE | NO | The start time. |
| ESTIMATED_FINISH_TIME | TIMESTAMP(6) WITH LOCAL TIME ZONE | NO | The estimated completion time. If COMPACTION_PROGRESS is displayed as 100, the compaction end time is displayed. |
| COMMENTS | VARCHAR2(1024) | NO | Stores the latest compaction event information during ongoing major compactions. If a major compaction is completed, stores the total time consumption. |
Sample query
The tenant user queries the major compaction progress of the tenant on the current OBServer node.
obclient [SYS]> SELECT * FROM SYS.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 | 1004 | MAJOR_MERGE | zone1 | 1735668003058920000 | FINISH | 2 | 0 | 0 | 0 | 1 | 01-JAN-25 02.00.03.770432 AM | 01-JAN-25 02.02.16.903124 AM | total=6.93ms; |
| 172.xx.xxx.xxx | 2882 | 1004 | MAJOR_MERGE | zone1 | 1735754404488391000 | FINISH | 2 | 0 | 0 | 0 | 1 | 02-JAN-25 02.00.07.115160 AM | 02-JAN-25 02.02.20.064100 AM | total=5.81ms; |
+----------------+----------+-----------+-------------+-------+---------------------+--------+--------------------+-------------------------+-----------+----------------------+-------------------+------------------------------+------------------------------+---------------+
2 rows in set