π ClickHouse Internals
ClickHouse is a column-oriented OLAP database designed for blazing-fast analytical queries. These visualizations help you understand how MergeTree stores data, how merges work, and how to tune for your workload.
MergeTree Engine
Parts, merges, sparse indexes, and column-oriented storage
Distributed Tables
Sharding, replication, and cross-shard queries
Materialized Views
Real-time aggregation pipelines and projection chains
Query Execution Pipeline
Parsing, processor DAG, parallel reads, two-level aggregation, and backpressure
Data Compression
Codec stacking, per-column compression, and storage efficiency
Primary Keys & Indexing
Sparse indexes, granules, ORDER BY vs PRIMARY KEY, compound keys, and data skipping indexes
Partitioning
How PARTITION BY splits data into parts, partition pruning, granularity trade-offs, and lifecycle with TTL
Joins & Dictionaries
Hash joins, external dictionaries, and lookup strategies
Dictionaries Deep Dive
In-memory key-value lookups β replace JOINs with O(1) dictGet() calls from external sources
Data Ingestion
Batch inserts, async writes, Kafka engine & streaming patterns
ReplicatedMergeTree
ZooKeeper coordination, insert deduplication, and quorum writes
Mutations & ALTER
How UPDATE & DELETE actually work β part rewrites, mutation queues, and lightweight deletes
ClickHouse vs BigQuery
Open-source columnar powerhouse vs Google's serverless warehouse β latency, cost, Dremel internals, and decision guide
ClickHouse vs Snowflake
Open-source speed demon vs cloud warehouse giant β architecture, performance, cost, and when to use each
ClickHouse vs DuckDB
Architecture comparison, benchmarks, and when to use each columnar engine
ClickHouse vs TimescaleDB
Columnar OLAP vs PostgreSQL time-series β storage, compression, query benchmarks, and decision guide
ClickHouse vs Elasticsearch
Log analytics showdown β storage, query performance, cost, and migration guide from ELK
ClickHouse vs Apache Druid
Real-time OLAP showdown β storage formats, ingestion pipelines, query models, and when to choose each
ReplacingMergeTree
Deduplication, version columns, FINAL keyword, and mutable data patterns in ClickHouse
Performance Tuning
Profiling queries, system tables, and optimization patterns