VersionedCollapsingMergeTree engine

This engine allows to quickly write object states that are continually changing and deletes old object states in the background. This significantly reduces the volume of storage.

The engine inherits from MergeTree and adds the logic for collapsing rows to the algorithm for merging data parts. VersionedCollapsingMergeTree serves the same purpose as CollapsingMergeTree but uses a different collapsing algorithm that allows inserting the data in any order with multiple threads.

Engine Parameters

You can use the following parameters to configure the engine.

sign

sign is the name of the column with the type of row: 1 is a “state” row, -1 is a “cancel” row.

The column data type should be Int8.

version

version is the name of the column with the version of the object state.

The column data type should be UInt*.

Query clauses

When creating a VersionedCollapsingMergeTree table, the same clauses as when creating a MergeTree table are required.

Settings

For a list of supported settings, see Engine settings.

Was this page helpful?
Updated