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
[](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_7COMPONENT STACK (8)
- Ingest / BI ClientSTATELESSBatch INSERT / SQL
- Batch Insert WriterSTATELESSSorts block by ORDER BY key
- Immutable Data PartsSTATEFULColumnar .bin + LZ4/ZSTD
- Sparse Primary IndexSTATEFUL1 mark per 8,192 rows in RAM
- Background MergerSTATELESSCombines parts + Replacing/Agg
- Vectorized SIMD ExecSTATELESSColumn-batch CPU pipeline
- ClickHouse KeeperSTATEFULRaft metadata + replication log
- Downstream & OTelSTATELESSConsumers, metrics & SLOs
REQUEST & DATA FLOW (8)
- Ingest / BI Client → Batch Insert Writer (Batch)[HTTP/Nat]
- Batch Insert Writer → Immutable Data Parts (Write)[Columnar]
- Batch Insert Writer → Sparse Primary Index (Emit)[RAM]
- Sparse Primary Index → Vectorized SIMD Exec (Prune)[SIMD]
- Immutable Data Parts → Vectorized SIMD Exec (Read)[Seq IO]
- Background Merger → Immutable Data Parts (Merge)[MergeTre]
- Background Merger → ClickHouse Keeper (Commit)[Raft]
- Vectorized SIMD Exec → Downstream & OTel (Emit /)[OTLP/API]