Note
This view is available starting with V4.0.0.
Purpose
The V$OB_TABLET_COMPACTION_HISTORY view displays the history of tablet-level compactions.
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. 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 macroblocks that are reused. |
| NEW_MICRO_COUNT_IN_NEW_MACRO | NUMBER(38) | NO | The number of new microblocks in a new macroblock. |
| MULTIPLEXED_MICRO_COUNT_IN_NEW_MACRO | NUMBER(38) | NO | The number of reused microblocks in a new macroblock. |
| 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 new data: the ratio of the compressed size to the original size of the new macroblock data. |
| NEW_FLUSH_DATA_RATE | NUMBER(38) | NO | The output speed of new data, in KB/s. |
| PROGRESSIVE_COMPACTION_ROUND | NUMBER(38) | NO | The current round of progressive compaction. If the compaction is a full compaction, the value is -1. |
| PROGRESSIVE_COMPACTION_NUM | NUMBER(38) | NO | The total number of 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). |
| PARTICIPANT_TABLE | VARCHAR2(512) | NO | The information about the table that participates in the current compaction. |
| 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 the compaction history, such as the compaction failure history and the time consumed by the current compaction. |
| START_CG_ID | NUMBER(38) | NO | Column Group's Start ID
NoteThis column is available starting with V4.3.0. |
| END_CG_ID | NUMBER(38) | NO | Column Group's End ID
NoteThis column is available starting with V4.3.0. |
| KEPT_SNAPSHOT | VARCHAR2(128) | NO | The information about the multi-version point that is retained during this compaction
NoteThis column is available starting with V4.3.0. |
| MERGE_LEVEL | VARCHAR2(64) | NO | Indicates whether minor compaction or microblock reuse is performed during this compaction
NoteThis column is available starting with V4.3.0. |
| EXEC_MODE | VARCHAR2(64) | NO | The mode of the compaction trace. Valid values:
NoteThis column is available starting with V4.3.3. |
| IS_FULL_MERGE | VARCHAR2(5) | NO | Indicates whether the compaction is a full compaction.
NoteThis column is available starting with V4.3.3. |
| IO_COST_TIME_PERCENTAGE | NUMBER(38) | NO | The ratio of I/O time to compaction time.
NoteThis column is available starting with V4.3.3. |
| MERGE_REASON | VARCHAR2(32) | NO | The reason for the compaction. Valid values:
NoteThis column is available starting with V4.3.3. |
| BASE_MAJOR_STATUS | VARCHAR2(64) | NO | The type of the major SSTable before the compaction:
NoteThis column is available starting with V4.3.3. |
| CO_MERGE_TYPE | VARCHAR2(64) | NO | The type of the columnar compaction:
NoteThis column is available starting with V4.3.3. |
| MDS_FILTER_INFO | VARCHAR2(1024) | NO | The MDS filter information used during the compaction
NoteThis column is available starting with V4.3.5 and takes effect starting with V4.3.5 BP2. |
| EXECUTE_TIME | NUMBER(38) | NO | The CPU time consumed by the compaction task, in microseconds |
| FILTER_ROW_COUNT | NUMBER(38) | NO | The number of rows that are reclaimed by the compaction
NoteThis column is available starting with V4.6.0. |
Sample query
Query the tablet-level compaction history on the current OBServer node.
obclient(SYS@oracle001)[SYS]> SELECT * FROM SYS.V$OB_TABLET_COMPACTION_HISTORY WHERE ROWNUM = 1\G
The query result is as follows:
*************************** 1. row ***************************
SVR_IP: 172.xx.xxx.xxx
SVR_PORT: 2882
TENANT_ID: 1004
LS_ID: 1
TABLET_ID: 60379
TYPE: MAJOR_MERGE
COMPACTION_SCN: 1770746403074861000
START_TIME: 11-FEB-26 02.03.37.196338 AM
FINISH_TIME: 11-FEB-26 02.03.37.205134 AM
TASK_ID: YB42AC1E87C4-00064A6F25E27C1A-0-0
OCCUPY_SIZE: 0
MACRO_BLOCK_COUNT: 0
MULTIPLEXED_MACRO_BLOCK_COUNT: 0
NEW_MICRO_COUNT_IN_NEW_MACRO: 0
MULTIPLEXED_MICRO_COUNT_IN_NEW_MACRO: 0
TOTAL_ROW_COUNT: 0
INCREMENTAL_ROW_COUNT: 0
COMPRESSION_RATIO: 1
NEW_FLUSH_DATA_RATE: 0
PROGRESSIVE_COMPACTION_ROUND: 1
PROGRESSIVE_COMPACTION_NUM: 0
PARALLEL_DEGREE: 1
PARALLEL_INFO: -
PARTICIPANT_TABLE: table_cnt=1,[MAJOR]snapshot_version=1;
MACRO_ID_LIST: NULL
COMMENTS: NULL
START_CG_ID: 0
END_CG_ID: 0
KEPT_SNAPSHOT: {type:"LS_RESERVED", snapshot:1770744803218480000}
MERGE_LEVEL: MICRO_BLOCK_LEVEL
EXEC_MODE: EXEC_MODE_LOCAL
IS_FULL_MERGE: FALSE
IO_COST_TIME_PERCENTAGE: 0
MERGE_REASON: TENANT_MAJOR
BASE_MAJOR_STATUS: NULL
CO_MERGE_TYPE: NULL
MDS_FILTER_INFO: NULL
EXECUTE_TIME: 752
FILTER_ROW_COUNT: 0
1 row in set (0.008 sec)
References
View the detailed history of tablet-level major compactions on all nodes: GV$OB_TABLET_COMPACTION_HISTORY
View the progress of tablet-level major compactions on the current node: V$OB_TABLET_COMPACTION_PROGRESS
