Note
This view is available starting with V4.0.0.
Purpose
The GV$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 ID of the data tablet. |
| TYPE | VARCHAR2(64) | NO | The type of the compaction. Valid values:
|
| COMPACTION_SCN | NUMBER(38) | NO | The compaction version. For minor compactions, the value 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 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 generated in new macroblocks. |
| MULTIPLEXED_MICRO_COUNT_IN_NEW_MACRO | NUMBER(38) | NO | The number of reused microblocks generated in new macroblocks. |
| TOTAL_ROW_COUNT | NUMBER(38) | NO | The total number of rows. |
| INCREMENTAL_ROW_COUNT | NUMBER(38) | NO | The number of new rows output. |
| COMPRESSION_RATIO | NUMBER(38) | NO | The compression ratio of the new data. The value is the ratio of the size of the compressed data to the size of the data before compression. |
| NEW_FLUSH_DATA_RATE | NUMBER(38) | NO | The output speed of the new data, in KB/s. |
| PROGRESSIVE_COMPACTION_ROUND | NUMBER(38) | NO | The current round of the 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 the progressive compaction. |
| PARALLEL_DEGREE | NUMBER(38) | NO | The parallelism. |
| PARALLEL_INFO | VARCHAR2(512) | NO | The information about the parallel tasks. The information includes the statistics of the amount of data scanned, the running time, and the amount of data output by the parallel tasks. The statistics include the minimum, maximum, and average values. |
| PARTICIPANT_TABLE | VARCHAR2(512) | NO | The information about the tables involved in the compaction. |
| MACRO_ID_LIST | varchar2(256) | NO | The list of macroblocks output. If the list is too long, it will not be displayed. |
| COMMENTS | varchar2(256) | NO | The information about the compaction history, such as the information about failed compactions and the information about the compaction time. |
| 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 retained by the current compaction
NoteThis column is available starting with V4.3.0. |
| MERGE_LEVEL | VARCHAR2(64) | NO | Whether the current execution uses major compaction or microblock reuse
NoteThis column is available starting with V4.3.0. |
| EXEC_MODE | VARCHAR2(64) | NO | The mode of the current compaction trace. Valid values:
NoteThis column is available starting with V4.3.3. |
| IS_FULL_MERGE | VARCHAR2(5) | NO | Indicates whether the current 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 the 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. Valid values:
NoteThis column is available starting with V4.3.3. |
| CO_MERGE_TYPE | VARCHAR2(64) | NO | The type of the column store compaction. Valid values:
NoteThis column is available starting with V4.3.3. |
| MDS_FILTER_INFO | VARCHAR2(1024) | NO | The MDS filter information used for the compaction
Note
|
| 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 recycled by the compaction
NoteThis column is available starting with V4.6.0. |
Sample query
Query the tablet-level compaction history information on all OBServer nodes in the user tenant.
obclient(SYS@oracle001)[SYS]> SELECT * FROM SYS.GV$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
References
Query the detailed history information of tablet-level major compactions on the current node: V$OB_TABLET_COMPACTION_HISTORY
Query the progress information of tablet-level compactions on all nodes: GV$OB_TABLET_COMPACTION_PROGRESS
