Skip to main content
ARCHOS 525 BLUEPRINT · /d/dgm_int-clickhouse

ClickHouse MergeTree Internals (Columnar Parts, Sparse Index & Vectorized Exec)

8 COMPONENTS · 8 FLOWS · UPDATED 2026-11-24
GITHUB README / PR PREVIEW CARD
[![ClickHouse MergeTree Internals (Columnar Parts, Sparse Index & Vectorized Exec) — ArchOS Architecture](https://archos.sageideas.dev/d/dgm_int-clickhouse/opengraph-image)](https://archos.sageideas.dev/d/dgm_int-clickhouse)

*Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_int-clickhouse)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_int-clickhouse" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="ClickHouse MergeTree Internals (Columnar Parts, Sparse Index & Vectorized Exec) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
  client_0["Ingest / BI Client"]
  ing_1["Batch Insert Writer"]
  parts_2[("Immutable Data Parts")]
  idx_3[("Sparse Primary Index")]
  merge_4["Background Merger"]
  vec_5["Vectorized SIMD Exec"]
  zk_6[("ClickHouse Keeper")]
  downstream_7["Downstream & OTel"]
  client_0 -->|"1. Batch · HTTP/Nat"| ing_1
  ing_1 -->|"2a. Write · Columnar"| parts_2
  ing_1 -->|"2b. Emit · RAM"| idx_3
  idx_3 -->|"3a. Prune · SIMD"| vec_5
  parts_2 -->|"3b. Read · Seq IO"| vec_5
  merge_4 -->|"Merge · MergeTre"| parts_2
  merge_4 -->|"Commit · Raft"| zk_6
  vec_5 -.->|"4. Emit / · OTLP/API"| downstream_7

COMPONENT STACK (8)

  • Ingest / BI ClientSTATELESS
    Batch INSERT / SQL
  • Batch Insert WriterSTATELESS
    Sorts block by ORDER BY key
  • Immutable Data PartsSTATEFUL
    Columnar .bin + LZ4/ZSTD
  • Sparse Primary IndexSTATEFUL
    1 mark per 8,192 rows in RAM
  • Background MergerSTATELESS
    Combines parts + Replacing/Agg
  • Vectorized SIMD ExecSTATELESS
    Column-batch CPU pipeline
  • ClickHouse KeeperSTATEFUL
    Raft metadata + replication log
  • Downstream & OTelSTATELESS
    Consumers, metrics & SLOs

REQUEST & DATA FLOW (8)

  1. Ingest / BI Client → Batch Insert Writer (Batch)[HTTP/Nat]
  2. Batch Insert Writer → Immutable Data Parts (Write)[Columnar]
  3. Batch Insert Writer → Sparse Primary Index (Emit)[RAM]
  4. Sparse Primary Index → Vectorized SIMD Exec (Prune)[SIMD]
  5. Immutable Data Parts → Vectorized SIMD Exec (Read)[Seq IO]
  6. Background Merger → Immutable Data Parts (Merge)[MergeTre]
  7. Background Merger → ClickHouse Keeper (Commit)[Raft]
  8. Vectorized SIMD Exec → Downstream & OTel (Emit /)[OTLP/API]
Configure NGINX / Postgres / K8s →60-Sec L4–L7 Diagnostic →