Skip to main content
Skip to main content
Edit this page

Avoid OPTIMIZE FINAL

ClickHouse tables using the MergeTree engine store data on disk as immutable parts, which are created every time data is inserted.

Each insert creates a new part containing sorted, compressed column files, along with metadata like indexes and checksums. For a detailed description of part structures and how they are formed we recommend this guide.

Over time, background processes merge smaller parts into larger ones to reduce fragmentation and improve query performance.