Sap Hana - Delta Merge Operation

> Database > SAP HANA Database (hdb)

1 - About

The Delta Merge Operation is an operation on a table column store data structure.

The purpose of the delta merge operation is to move changes collected in the delta storage to the read-optimized main storage.

After the delta merge operation, the content of the main storage is persisted to disk and its compression recalculated and optimized if necessary.

A further result of the delta merge operation is truncation of the delta log (ie redo operations)

It is important to understand that even if a column store table is unloaded or partly loaded, the whole table is loaded into memory to perform the delta merge.

During the delta merge operation, every partition of a partitioned table is treated internally as a standalone table with its own data and delta store.

Advertising

3 - Management

3.1 - SQL

MERGE DELTA OF '<table_name>' (hard MERGE)
MERGE DELTA OF '<table_name>' WITH PARAMETERS ('FORCED_MERGE' = 'ON') (forced MERGE)
MERGE DELTA OF '<table_name>' WITH PARAMETERS ('MEMORY_MERGE' = 'ON') (memory-ONLY MERGE)