Initiate a merge

更新时间:
复制 MD 格式

This topic describes how to merge data.

Background information

The OceanBase database uses a storage engine based on the LSM-Tree architecture. It divides data into two parts: static baseline data in SSTables and dynamic incremental data in MemTables. SSTables are read-only and stored on disk. After an SSTable is generated, it is not modified. MemTables support read and write operations and are stored in memory. Database Data Manipulation Language (DML) operations, such as inserts, updates, and deletes, are first written to MemTables. When a MemTable reaches a certain size, its data is dumped to disk to become an SSTable. For more information, see Storage architecture overview.

When a MemTable's size exceeds a certain threshold, its data is dumped to an SSTable to free up memory. This process is called a dump. For more information about dumps, see Dump.

A dump generates a new SSTable. When the number of dumps exceeds a certain threshold, or during daily off-peak hours, the system merges the baseline SSTable with the incremental SSTables from subsequent dumps into a single SSTable. This process is called a merge. For more information about merges, see Merge.

Scenarios

  • Scheduled merge: This merge does not require manual scheduling. The system automatically performs the merge operation during off-peak hours based on business traffic.

  • Manual merge: You can initiate a data merge at any time as needed.

    Note

    A data merge operation can degrade business performance. To ensure stable business operations, perform this operation during off-peak hours.

Procedure

  1. Log on to the OceanBase Management Console.

  2. In the navigation pane on the left, click Instance List.

  3. In the instance list, find the destination instance and click its name. This opens the Cluster Instance Workbench.

  4. On the Cluster Workbench page, click Operations, and select Initiate Merge.

    image

  5. In the dialog box that appears, click Initiate Merge again to start the data merge immediately.

    Note
    1. If a backup job is in progress, performing a data merge will delay the backup process.

    2. Merging data can affect database performance. Perform this operation during off-peak hours.

    2