Note
This view is available starting with V4.0.0.
Purpose
This view displays the historical information of tablet-level compactions for the current tenant across all nodes.
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 tenant ID. |
| LS_ID | NUMBER(38) | NO | The log stream ID. |
| TABLET_ID | NUMBER(38) | NO | The data tablet ID. |
| TYPE | VARCHAR2(64) | NO | The type of compaction. Valid values:
|
| COMPACTION_SCN | NUMBER(38) | NO | The compaction version: minor compaction corresponds to 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 volume. |
| 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 rows. |
| COMPRESSION_RATIO | NUMBER(38) | NO | The compression ratio of the new data: the ratio of the compressed data to the original data in the new macroblocks. |
| PROGRESSIVE_COMPACTION_ROUND | NUMBER(38) | NO | The current round of progressive compaction. If the compaction is 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 of the parallel tasks, including the statistics of the scanned data volume, running time, and output data volume (minimum value, maximum value, and average value) of the parallel tasks. |
| MACRO_ID_LIST | varchar2(256) | NO | The list of output macroblocks. If the list is too long, it will not be displayed. |
| COMMENTS | varchar2(256) | NO | Records the historical information of failed compactions, the time consumption of the current compaction, and so on. |
Sample query
Query the history of tablet-level major compactions for the current user tenant on all nodes and display the first five records.
obclient [SYS]> SELECT * FROM SYS.GV$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 the current node: V$OB_TABLET_COMPACTION_HISTORY