Note
This view is available starting with V4.0.0.
Purpose
This view displays the historical information about tablet-level compactions for the current tenant on the current node.
Columns
| Column | 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 ID of the tenant. |
| LS_ID | NUMBER(38) | NO | The ID of the log stream. |
| TABLET_ID | NUMBER(38) | NO | The ID of the data tablet. |
| TYPE | VARCHAR2(64) | NO | The type of compaction. Valid values:
|
| COMPACTION_SCN | NUMBER(38) | NO | The compaction version. For minor compaction, it is the snapshot version. |
| START_TIME | TIMESTAMP(6) WITH LOCAL TIME ZONE | NO | The start time. |
| FINISH_TIME | TIMESTAMP(6) WITH LOCAL TIME ZONE | NO | The end time. |
| OCCUPY_SIZE | NUMBER(38) | NO | The data size. |
| MACRO_BLOCK_COUNT | NUMBER(38) | NO | The number of macroblocks. |
| MULTIPLEXED_MACRO_BLOCK_COUNT | NUMBER(38) | NO | The number of reused macroblocks. |
| NEW_MICRO_COUNT_IN_NEW_MACRO | NUMBER(38) | NO | The number of new microblocks in the new macroblocks. |
| MULTIPLEXED_MICRO_COUNT_IN_NEW_MACRO | NUMBER(38) | NO | The number of reused microblocks in the new macroblocks. |
| TOTAL_ROW_COUNT | NUMBER(38) | NO | The total number of rows. |
| INCREMENTAL_ROW_COUNT | NUMBER(38) | NO | The number of new output rows. |
| COMPRESSION_RATIO | NUMBER(38) | NO | The compression ratio of the new data. It is the ratio of the size of the compressed data to the size of the data before compression. |
| PROGRESSIVE_COMPACTION_ROUND | NUMBER(38) | NO | The current round of progressive compaction. If the compaction is a full compaction, this column is -1. |
| PROGRESSIVE_COMPACTION_NUM | NUMBER(38) | NO | The total rounds of progressive compaction. |
| PARALLEL_DEGREE | NUMBER(38) | NO | The parallelism. |
| PARALLEL_INFO | VARCHAR2(512) | NO | The information about parallel tasks, including the statistics of the amount of data scanned, running time, and output data (minimum, maximum, and average values). |
| MACRO_ID_LIST | varchar2(256) | NO | The list of output macroblocks. If the list is too long, it is not displayed. |
| COMMENTS | varchar2(256) | NO | The information about failed compactions in the past and the time consumed by the current compaction. |
Sample query
Query the history of Tablet-level major compactions for the current tenant on all nodes, and display the first five records.
obclient [SYS]> SELECT * FROM SYS.V$OB_TABLET_COMPACTION_HISTORY WHERE ROWNUM <= 5;
The query result is as follows:
+----------------+----------+-----------+-------+-----------+-----------------+---------------------+------------------------------+------------------------------+-----------------------------------+-------------+-------------------+-------------------------------+------------------------------+--------------------------------------+-----------------+-----------------------+-------------------+---------------------+------------------------------+----------------------------+-----------------+---------------+----------------------------------------------------------+---------------+----------------------------------------+
| SVR_IP | SVR_PORT | TENANT_ID | LS_ID | TABLET_ID | TYPE | COMPACTION_SCN | START_TIME | FINISH_TIME | TASK_ID | OCCUPY_SIZE | MACRO_BLOCK_COUNT | MULTIPLEXED_MACRO_BLOCK_COUNT | NEW_MICRO_COUNT_IN_NEW_MACRO | MULTIPLEXED_MICRO_COUNT_IN_NEW_MACRO | TOTAL_ROW_COUNT | INCREMENTAL_ROW_COUNT | COMPRESSION_RATIO | NEW_FLUSH_DATA_RATE | PROGRESSIVE_COMPACTION_ROUND | PROGRESSIVE_COMPACTION_NUM | PARALLEL_DEGREE | PARALLEL_INFO | PARTICIPANT_TABLE | MACRO_ID_LIST | COMMENTS |
+----------------+----------+-----------+-------+-----------+-----------------+---------------------+------------------------------+------------------------------+-----------------------------------+-------------+-------------------+-------------------------------+------------------------------+--------------------------------------+-----------------+-----------------------+-------------------+---------------------+------------------------------+----------------------------+-----------------+---------------+----------------------------------------------------------+---------------+----------------------------------------+
| 172.xx.xxx.xxx | 2882 | 1004 | 1002 | 200005 | MAJOR_MERGE | 1735668003058920000 | 01-JAN-25 02.00.17.693978 AM | 01-JAN-25 02.00.17.694744 AM | YB42AC1E87E3-00062A8B7F671A80-0-0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | - | table_cnt=1,[MAJOR]snapshot_version=1; | NULL | extra_info="time_guard=total=5.30ms;"; |
| 172.xx.xxx.xxx | 2882 | 1004 | 1002 | 200002 | MAJOR_MERGE | 1735668003058920000 | 01-JAN-25 02.00.17.693997 AM | 01-JAN-25 02.00.17.694742 AM | YB42AC1E87E3-00062A8B7F671A81-0-0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | - | table_cnt=1,[MAJOR]snapshot_version=1; | NULL | extra_info="time_guard=total=5.28ms;"; |
| 172.xx.xxx.xxx | 2882 | 1004 | 1002 | 200002 | MAJOR_MERGE | 1735754404488391000 | 02-JAN-25 02.00.22.055200 AM | 02-JAN-25 02.00.22.055829 AM | YB42AC1E87E3-00062A8B7F671A86-0-0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | - | table_cnt=1,[MAJOR]snapshot_version=1735668003058920000; | NULL | extra_info="time_guard=total=7.00ms;"; |
| 172.xx.xxx.xxx | 2882 | 1004 | 1002 | 200005 | MAJOR_MERGE | 1735754404488391000 | 02-JAN-25 02.00.22.055218 AM | 02-JAN-25 02.00.22.055908 AM | YB42AC1E87E3-00062A8B7F671A87-0-0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | - | table_cnt=1,[MAJOR]snapshot_version=1735668003058920000; | NULL | extra_info="time_guard=total=7.13ms;"; |
| 172.xx.xxx.xxx | 2882 | 1004 | 1002 | 200002 | MDS_TABLE_MERGE | 1735631615655906000 | 31-DEC-24 03.53.35.861699 PM | 31-DEC-24 03.53.35.863623 PM | YB42AC1E87E3-00062A8B7F671A7C-0-0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | - | NULL | NULL | extra_info="time_guard=total=1.92ms;"; |
+----------------+----------+-----------+-------+-----------+-----------------+---------------------+------------------------------+------------------------------+-----------------------------------+-------------+-------------------+-------------------------------+------------------------------+--------------------------------------+-----------------+-----------------------+-------------------+---------------------+------------------------------+----------------------------+-----------------+---------------+----------------------------------------------------------+---------------+----------------------------------------+
5 rows in set
References
- View the detailed history of Tablet-level major compactions on all nodes: GV$OB_TABLET_COMPACTION_HISTORY