Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

ClickHouse 13 min read Release mediumAdept

ClickHouse Release 25.7

ClickHouse 25.7 adds standard SQL UPDATE and DELETE built on lightweight "patch parts". Instead of rewriting columns, small immutable parts are applied during background merges and matched at query time, making declarative updates up to 1,000× faster in ClickHouse's benchmarks. count() GROUP BY aggregations now store the 64-bit count directly in the hash table cell, skipping the memory arena and pointer indirection, which cut query time ~34% and memory ~21% on a 100M-row benchmark. The release also brings four hash-join optimizations: tighter single-key loops, faster OR-condition joins, no repeated hashing, and precisely sized result buffers, worth roughly 1.4–1.8× speedups, plus AI-powered SQL generation in clickhouse-client via a `??` prefix.

Related posts

  • How we built fast UPDATEs for the ClickHouse column store – Part 2: SQL-style UPDATEs

    ClickHouse hardMaster

    ClickHouse implemented standard SQL UPDATE in its MergeTree column store by evolving from classic mutations (which rewrite whole affected columns and hard-link unchanged ones) through lightweight DELETEs via a _row_exists mask column and on-the-fly in-memory updates, to patch parts. A patch part is a compact delta containing only changed column values plus _part and _part_offset metadata. It is visible to queries immediately and applied during normal background merges in a single linear pass, with no resorting or extra indexing. This avoids full column rewrites and blocking on prior merges, making frequent row-level updates practical (experimental in 25.7, beta expected in 25.8).

  • How we made ClickHouse UPDATEs 1,000× faster (Part 3: Benchmarks)

    ClickHouse hardMaster

    ClickHouse's new standard SQL UPDATEs, implemented as lightweight patch parts, make changes visible up to ~1,000–1,700× faster than classic mutations on a 600M-row TPC-H lineitem table: one bulk update dropped from about 100 s to 60 ms. The benchmark compares classic mutations, on-the-fly mutations, lightweight updates and ReplacingMergeTree inserts for both bulk and single-row updates, measuring time to visibility and worst-case query slowdown before merges. Lightweight updates add only about 12–15% average query overhead, rising to 39–121% in a rare join-mode fallback. On-the-fly mutations average 149% slowdown, and ReplacingMergeTree with FINAL averages about 280% slowdown with 20–200× the memory. ReplacingMergeTree inserts are the fastest way to write single rows, but lightweight updates give the best balance of write speed and query cost.

  • ClickHouse Release 25.11

    ClickHouse mediumAdept

    ClickHouse 25.11 ships 24 features, 27 performance optimizations and 97 bug fixes. Headline additions are automatic TLS certificate provisioning via ACME (Let's Encrypt, ZeroSSL), with certificates shared across the cluster through ClickHouse Keeper, and parallel merging for GROUP BY on 8/16-bit keys. That merge works because FixedHashMap is a directly indexed array, so merge threads can each take disjoint, interleaved key positions without locks, giving about a 40% speedup on a uniqExact benchmark. Lightweight _part_offset projections now prune at granule level and act as secondary indexes, cutting a two-filter query by 90%. DISTINCT queries can also read from smaller pre-aggregated projections when those contain the distinct key.

  • ClickHouse Release 25.2

    ClickHouse mediumAdept

    ClickHouse 25.2 ships 12 features, 15 performance optimizations and 72 bug fixes. The parallel hash join build phase no longer locks every hash table to check size limits when max_rows_in_join and max_bytes_in_join are unset. That removes thread contention and halves a synthetic 1-billion-row join from 12.3s to 6.3s on 32 cores. Parquet output now writes Bloom filters by default, costing about 10% in file size and speeding point lookups by 30-40%. The optimizer also infers transitive conditions, such as a < 5 from a < b < 5, so primary-key pruning can apply. The release adds a read-only Backup database engine, experimental Delta Lake support via the Delta Rust kernel, and compact JSON WithProgress streaming formats over HTTP.

  • Handling Updates and Deletes in ClickHouse

    ClickHouse mediumAdept

    ClickHouse offers several ways to modify mostly-immutable analytical data, each with different costs. Lightweight Deletes (DELETE FROM) write a _row_exists mask and rely on background merges to physically remove rows, which makes them cheap but leaves space reclamation non-deterministic. ALTER UPDATE/DELETE mutations rewrite whole parts, so they are heavy but guarantee removal, which matters for compliance. Cheaper alternatives cover specific cases: swapping in a new column with a DEFAULT for whole-table updates, Join engine plus joinGet for join-based updates, dropping partitions or using TTL for bulk and time-based deletion, and CollapsingMergeTree sign rows for frequent row-level updates.

The quest for software engineering knowledge.

Look:
Layout: