Help Center/ AI DataLake/ Flink reference/ Enhanced Flink Features/ Using RocksDB Merge Operator in FlinkSQL to Improve the Performance of the Join Operator
Updated on 2026-11-06 GMT+08:00

Using RocksDB Merge Operator in FlinkSQL to Improve the Performance of the Join Operator

Scenario

In FlinkSQL jobs that use the RocksDB state backend, the Join operator with NoUniqueKey needs to read the old value and then write the new value when updating the state. This causes a large amount of read amplification overhead, which deteriorates the performance of the Join operator. After this feature is enabled, the Join operator can directly update the state through the merge operation, improving the computing performance of the Join operator.

Notes and Constraints

  • This feature works only when the RocksDB state backend is used.
  • Snapshots generated before and after this feature is enabled are incompatible.

Usage

You can use either of the following methods to set table.exec.join.use-merge-operator to true to enable the MergeOperator feature:

  • Method 1: When configuring a Flink job, add this custom parameter to the flink_config parameter of the job.
  • Method 2: Add this custom parameter to the Flink parameters of the endpoint.