v.20.6Experimental Feature
Added In-Memory Format for MergeTree Parts with Write-Ahead-Log Support
Added new in-memory format of parts inMergeTree-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 thresholdsmin_rows_for_compact_partandmin_bytes_for_compact_part. Also optional support of Write-Ahead-Log is available, which is enabled by default and is controlled by settingin_memory_parts_enable_wal. #10697 (Anton Popov).
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 bymin_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.