CollapsingMergeTree: Current State from Event Streams
CollapsingMergeTree trades ingestion complexity for query simplicity. Cancel the old row, insert the new one — merges do the rest. No FINAL, no argMax, just sum(col * Sign).

CollapsingMergeTree trades ingestion complexity for query simplicity. Cancel the old row, insert the new one — merges do the rest. No FINAL, no argMax, just sum(col * Sign).

Building cascading AggregatingMergeTree tables for real-time OHLC candles served through TradingView's UDF API, with live streaming via Durable Objects.

The complete AggregatingMergeTree reference: combinator patterns, cascading rollups, SimpleAggregateFunction vs AggregateFunction, and production gotchas.

How we use ReplacingMergeTree with is_deleted to serve current state from 25MB batches in under a second.

ReplacingMergeTree deduplicates at merge time, not insert time. Production patterns, FINAL performance, and the Postgres traps nobody warns you about.

I'm always working on new ideas. Check back regularly for updates.