Overview
Displays statistics related to completed compactions in the OceanBase AI Database cluster.
Columns
Field Name |
Type |
Whether can be NULL |
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 |
| ACTION | varchar(64) | NO | Compaction actions:
|
| COMPACTION_SCN | bigint(20) unsigned | NO | Compaction version number |
| START_TIME | timestamp(6) | NO | Compaction Start Time |
| END_TIME | timestamp(6) | NO | Compaction End Time |
| MACRO_BLOCK_COUNT | bigint(20) | NO | Total Number of Compaction Macroblocks |
| REUSE_PCT | decimal(26,2) | NO | Compaction Macroblock Reuse Rate |
| PARALLEL_DEGREE | bigint(20) | NO | Compaction Parallelism |
Sample query
Query the statistics of minor compactions (MINI_MERGE) completed by the current MySQL user tenant and return the first five records.
obclient [oceanbase]> SELECT * FROM oceanbase.V$OB_MERGE_INFO WHERE ACTION='MINI_MERGE' LIMIT 5;
The query result is as follows:
+----------------+----------+-----------+-------+-----------+------------+---------------------+----------------------------+----------------------------+-------------------+-----------+-----------------+
| SVR_IP | SVR_PORT | TENANT_ID | LS_ID | TABLET_ID | ACTION | COMPACTION_SCN | START_TIME | END_TIME | MACRO_BLOCK_COUNT | REUSE_PCT | PARALLEL_DEGREE |
+----------------+----------+-----------+-------+-----------+------------+---------------------+----------------------------+----------------------------+-------------------+-----------+-----------------+
| 172.xx.xxx.xxx | 2882 | 1002 | 1 | 49402 | MINI_MERGE | 1712895545480643155 | 2024-04-12 12:19:06.285433 | 2024-04-12 12:19:06.292896 | 1 | 0.00 | 1 |
| 172.xx.xxx.xxx | 2882 | 1002 | 1 | 49401 | MINI_MERGE | 1712895546279349 | 2024-04-12 12:19:06.279509 | 2024-04-12 12:19:06.361253 | 1 | 0.00 | 1 |
| 172.xx.xxx.xxx | 2882 | 1002 | 1 | 101001 | MINI_MERGE | 1712895545892669938 | 2024-04-12 12:19:10.331618 | 2024-04-12 12:19:10.335477 | 1 | 0.00 | 1 |
| 172.xx.xxx.xxx | 2882 | 1002 | 1 | 100006 | MINI_MERGE | 1712895545892669938 | 2024-04-12 12:19:10.331718 | 2024-04-12 12:19:10.335799 | 1 | 0.00 | 1 |
| 172.xx.xxx.xxx | 2882 | 1002 | 1 | 5 | MINI_MERGE | 1712895545892669938 | 2024-04-12 12:19:10.331664 | 2024-04-12 12:19:10.337510 | 1 | 0.00 | 1 |
+----------------+----------+-----------+-------+-----------+------------+---------------------+----------------------------+----------------------------+-------------------+-----------+-----------------+
5 rows in set
References
View statistics related to compactions completed on all nodes: GV$OB_MERGE_INFO
View the progress information of tablet-level compaction on the current node: V$OB_TABLET_COMPACTION_PROGRESS
View the historical information of tablet-level compactions on the current node: V$OB_TABLET_COMPACTION_HISTORY
View major compaction information for each zone: DBA_OB_ZONE_MAJOR_COMPACTION
View global major compaction information: DBA_OB_MAJOR_COMPACTION