v.20.6Experimental Feature

Added In-Memory Format for MergeTree Parts with Write-Ahead-Log Support

Added new in-memory format of parts in MergeTree-family tables, which stores data in memory. Parts are written on disk at first merge. Part will be created in in-memory format if its size in rows or bytes is below thresholds min_rows_for_compact_part and min_bytes_for_compact_part. Also optional support of Write-Ahead-Log is available, which is enabled by default and is controlled by setting in_memory_parts_enable_wal. #10697 (Anton Popov).
Introduced a new in-memory format for parts in MergeTree-family tables that stores data in memory before flushing to disk.

Why it matters

This feature improves performance for small parts by keeping them in memory, avoiding immediate disk writes until the parts reach defined size thresholds. It optimizes resource usage for workloads with frequent small data inserts and can enhance query speed on recent data.

How to use it

Parts are automatically created in in-memory format if their size in rows or bytes is below the thresholds defined by min_rows_for_compact_part and min_bytes_for_compact_part. Write-Ahead-Log (WAL) support is enabled by default and can be controlled with the setting in_memory_parts_enable_wal.