Data1984: post #956 — TG.ME

ClickHouse MergeTree and HBase are the same thing at their core.

Not literally — but architecturally, they share the same DNA: the LSM Tree (Log-Structured Merge Tree).

Here's how it works:

1. Writes hit memory first → fast, no disk I/O
2. When memory fills, flush to an immutable sorted file on disk
3. Background compaction merges files → removes duplicates, applies deletes
4. Bloom filters + sparse indexes make reads fast without scanning everything

HBase calls these HFiles. ClickHouse calls them Parts. Cassandra calls them SSTables. Same idea.

What ClickHouse adds on top:
★ Columnar layout inside each part (OLAP-optimized)
★ The merge step does useful analytical work — deduplication (ReplacingMergeTree), summation (SummingMergeTree), pre-aggregation (AggregatingMergeTree)
★ Sparse indexing at granule level (8192 rows) rather than row-level

I still teach HBase in my data engineering course — as a NoSQL example and as a core part of the Hadoop ecosystem. And honestly, I started my DE career working with it.

Sometimes I wondered: is this too specific? Should I simplify the curriculum and drop it?

But my teaching philosophy has always been to explain technologies by focusing on what's fundamental and shared across many systems. And this connection — HBase and ClickHouse both rooted in LSM Trees — is exactly why that approach pays off.

The tools change. The patterns underneath them don't.
👍2❤1
March 16, 2026 447 2