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 | Allow NULLs | Description |
|---|---|---|---|
| SVR_IP | varchar(46) | NO | Server IP address |
| SVR_PORT | bigint(20) | NO | Server port number |
| TENANT_ID | bigint(20) | NO | Tenant ID |
| LS_ID | bigint(20) | NO | Log stream ID |
| TABLET_ID | bigint(20) | NO | Data shard ID |
| TYPE | varchar(64) | NO | The type of compaction. The possible values are:
|
| COMPACTION_SCN | bigint(20) unsigned | NO | The version information of the compaction. |
| START_TIME | timestamp(6) | NO | Start time |
| FINISH_TIME | timestamp(6) | NO | End time |
| TASK_ID | varchar(64) | NO | The execution trace of the task. |
| OCCUPY_SIZE | bigint(20) | NO | The amount of data. |
| MACRO_BLOCK_COUNT | bigint(20) | NO | The number of macroblocks. |
| MULTIPLEXED_MACRO_BLOCK_COUNT | bigint(20) | NO | The number of reused macroblocks. |
| NEW_MICRO_COUNT_IN_NEW_MACRO | bigint(20) | NO | The number of new microblocks in a new macroblock. |
| MULTIPLEXED_MICRO_COUNT_IN_NEW_MACRO | bigint(20) | NO | The number of reused microblocks in a new macroblock. |
| TOTAL_ROW_COUNT | bigint(20) | NO | The total number of rows. |
| INCREMENTAL_ROW_COUNT | bigint(20) | NO | The number of new rows output. |
| COMPRESSION_RATIO | double | NO | The compression ratio of new data = (size of compressed new macroblock data/size of uncompressed new macroblock data) |
| NEW_FLUSH_DATA_RATE | bigint(20) | NO | The output speed of new data, in KB/s. |
| PROGRESSIVE_COMPACTION_ROUND | bigint(20) | NO | The current round of progressive compaction (if this is a full major compaction, the value of this column is -1). |
| PROGRESSIVE_COMPACTION_NUM | bigint(20) | NO | The total number of rounds of progressive compaction. |
| PARALLEL_DEGREE | bigint(20) | NO | The degree of parallelism. |
| PARALLEL_INFO | varchar(512) | NO | Information about parallel tasks, which displays the statistics (minimum value, maximum value, and average value) of the data scanned, running time, and data output for each parallel task. |
| PARTICIPANT_TABLE | varchar(512) | NO | The tables involved in the compaction. |
| MACRO_ID_LIST | varchar(256) | NO | The list of macroblocks output. If the list is too long, it is not displayed. |
| COMMENTS | varchar(256) | NO | Records the history of failed compactions and the time consumption of the current compaction. |
| START_CG_ID | bigint(20) | NO | Column Group's Start ID
NoteThis field is introduced in V4.3.0. |
| END_CG_ID | bigint(20) | NO | Column Group's End ID
NoteThis field is introduced in V4.3.0. |
| KEPT_SNAPSHOT | varchar(128) | NO | The information about the multi-version sites retained by this compaction
NoteThis field is introduced in V4.3.0. |
| MERGE_LEVEL | varchar(64) | NO | Specifies whether a major compaction or macroblock reuse is performed during the compaction
NoteThis field is introduced in V4.3.0. |
Example
A user tenant queries the historical information about minor compactions at the tablet level on this OBServer node.
obclient [oceanbase]> SELECT * FROM oceanbase.V$OB_TABLET_COMPACTION_HISTORY LIMIT 1\G
The query result is as follows:
*************************** 1. row ***************************
SVR_IP: 172.xx.xx.xx
SVR_PORT: 2882
TENANT_ID: 1002
LS_ID: 1
TABLET_ID: 60379
TYPE: MAJOR_MERGE
COMPACTION_SCN: 1722880804553022418
START_TIME: 2024-08-06 02:00:14.374896
FINISH_TIME: 2024-08-06 02:00:14.381909
TASK_ID: YB4XXXXXXXXX-000XXXXXXXXXXXX-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:
COMMENTS: comment="merge_reason="TENANT_MAJOR";time=add_time:1722880814374751|total=7.01ms;";
START_CG_ID: 0
END_CG_ID: 0
KEPT_SNAPSHOT: {type:"SNAPSHOT_UNDO_RETENTION", snapshot:1722879004021414960}
MERGE_LEVEL: MICRO_BLOCK_LEVEL
1 row in set