Note
Introduced in MySQL 4.0.0.
Description
The V$OB_TABLET_COMPACTION_HISTORY view displays the historical information about tablet-level major compactions.
Field descriptions
Field name |
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 shard ID. |
| TYPE | VARCHAR2(64) | NO | The type of compaction:
|
| COMPACTION_SCN | NUMBER(38) | NO | The version number of the compaction: the snapshot version for minor compactions. |
| 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 amount of data. |
| 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 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 output rows. |
| COMPRESSION_RATIO | NUMBER(38) | NO | The compression ratio of new data: the size of compressed data after compression/the size of data before compression. |
| PROGRESSIVE_COMPACTION_ROUND | NUMBER(38) | NO | The current round of progressive compaction. If this is a full compaction, the value of this column is -1. |
| PROGRESSIVE_COMPACTION_NUM | NUMBER(38) | NO | The total number of rounds of progressive compaction. |
| PARALLEL_DEGREE | NUMBER(38) | NO | The degree of parallelism. |
| PARALLEL_INFO | VARCHAR2(512) | NO | Information about parallel tasks, which displays the statistics (minimum value, maximum value, and average value) of the amount of data scanned, runtime, and output data for each parallel task. |
| MACRO_ID_LIST | varchar2(256) | NO | The list of macroblocks output. If the list is too long, it is not displayed. |
| COMMENTS | varchar2(256) | NO | Records the history of failed compactions and the duration of this compaction. |
| START_CG_ID | NUMBER(38) | NO | The start ID of the column group
NoteThis field is introduced in V4.3.0. |
| END_CG_ID | NUMBER(38) | NO | The end ID of the column group
NoteThis field is introduced in V4.3.0. |
| KEPT_SNAPSHOT | VARCHAR2(128) | NO | The information about the multi-version sites retained during this compaction
NoteThis field is introduced in V4.3.0. |
| MERGE_LEVEL | VARCHAR2(64) | NO | Specifies whether major compaction or reuse of microblocks is performed during this compaction.
NoteThis field is introduced in V4.3.0. |
| EXEC_MODE | VARCHAR2(64) | NO | The mode of this compaction trace:
NoteThis field is introduced in V4.3.3. |
| IS_FULL_MERGE | VARCHAR2(5) | NO | Specifies whether this compaction is a full compaction.
NoteThis field is introduced in V4.3.3. |
| IO_COST_TIME_PERCENTAGE | NUMBER(38) | NO | The percentage of I/O time in the compaction time. <main id notice" type='explain'>NoteThis field is introduced in V4.3.3. |
| MERGE_REASON | VARCHAR2(32) | NO | The reason for initiating this compaction. The possible values are as follows:
NoteThis field is introduced in V4.3.3. |
| BASE_MAJOR_STATUS | VARCHAR2(64) | NO | The types of Major SSTables before the compaction:
NoteThis field is introduced in V4.3.3. |
| CO_MERGE_TYPE | VARCHAR2(64) | NO | The columnar storage merge type:
NoteThis field is introduced in V4.3.3. |
Example
A user views the historical information about tablet-level compactions on this OBServer node.
obclient [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.xx.xx
SVR_PORT: 2882
TENANT_ID: 1004
LS_ID: 1
TABLET_ID: 60379
TYPE: MAJOR_MERGE
COMPACTION_SCN: 1722880804392106676
START_TIME: 06-AUG-24 02.00.49.532794 AM
FINISH_TIME: 06-AUG-24 02.00.49.540051 AM
TASK_ID: YB4XXXXXXXXX-000XXXXXXXXXXXXX-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: comment="merge_reason="TENANT_MAJOR";time=add_time:1722880849532694|total=7.26ms;";
START_CG_ID: 0
END_CG_ID: 0
KEPT_SNAPSHOT: NULL
MERGE_LEVEL: NULL
EXEC_MODE: EXEC_MODE_LOCAL
IS_FULL_MERGE: FALSE
IO_COST_TIME_PERCENTAGE: 0
MERGE_REASON: NULL
BASE_MAJOR_STATUS: NULL
CO_MERGE_TYPE: NULL
1 row in set
