---
title: "ClickHouse (hard)"
description: "Posts from ClickHouse on swe.quest."
url: "https://swe.quest/sources/clickhouse?difficulty=hard&per=48"
---

# ClickHouse (hard)

Posts from [ClickHouse](https://clickhouse.com/blog), newest first.

Posts 1–41 of 41, page 1 of 1, newest first.

## 2026-11-17

- [More load is faster: Tuning Postgres read replicas](https://swe.quest/articles/more-load-is-faster-tuning-postgres-read-replicas-edfe2bbdc0de0a5f.md): ClickHouse · 2026-11-17 · Hard · 9 min read · PostgreSQL, Replication, Performance engineering
  Postgres read replicas fed from archived WAL (rather than streaming replication) show a U-shaped lag curve: idle systems wait up to archive\_timeout (60s) for a 16MB segment to fill, while very high write rates make archive upload fall behind.

## 2026-11-04

- [Fencing a Postgres primary that might still be alive](https://swe.quest/articles/fencing-a-postgres-primary-that-might-still-be-alive-67043bdd5aea0f6c.md): ClickHouse · 2026-11-04 · Hard · 10 min read · PostgreSQL, Replication, Resilience, Networking, Cloud platforms
  Before promoting a standby, a managed Postgres control plane must fence the old primary, because promotion and DNS changes alone don't stop writes: async standbys, per-session synchronous\_commit overrides, quorum commit with a remaining standby, and canceled commits already in WAL can all let a still-alive primary accept writes.

## 2026-10-28

- [The new cost-based join optimizer with reordering support for non-inner joins](https://swe.quest/articles/the-new-cost-based-join-optimizer-with-reordering-support-for-non-inner-joins-60f6c88dd7c8b7a9.md): ClickHouse · 2026-10-28 · Hard · 17 min read · Query engines, Algorithms, Analytics & OLAP, Performance engineering
  ClickHouse's new cost-based join optimizer uses an exhaustive DPsub dynamic-programming enumerator over table-subset bitmasks.

## 2026-10-14

- [Why Redshift Serverless can’t match ClickHouse Cloud for real-time analytics](https://swe.quest/articles/why-redshift-serverless-can-t-match-clickhouse-cloud-for-real-time-analytics-8ba7c0518a8afd27.md): ClickHouse · 2026-10-14 · Hard · 20 min read · Analytics & OLAP, Stream processing, Cost optimization, Performance engineering, Cloud platforms
  In a CostBench continuous-ingestion test streaming 113.2 billion stock quotes at a target of 1M rows/s, ClickHouse Cloud scored 1,996× better end-to-end performance per dollar than Redshift Serverless.

## 2026-10-13

- [Chasing that 32 ms tail latency in ClickHouse](https://swe.quest/articles/chasing-that-32-ms-tail-latency-in-clickhouse-e6423f2da8a7c8b8.md): ClickHouse · 2026-10-13 · Hard · 11 min read · Networking, Performance engineering, Linux, Databases, Debugging
  An extra full round trip (~32 ms) on simple SELECTs over ClickHouse's Native protocol came from TCP\_NODELAY turning each end-of-query metadata packet (Logs, Progress, ProfileEvents) into its own TCP segment.

## 2026-09-30

- [Memory safety for Postgres extensions in C/C++](https://swe.quest/articles/memory-safety-for-postgres-extensions-in-c-c-b6883b8eb3b1e33d.md): ClickHouse · 2026-09-30 · Hard · 4 min read · PostgreSQL, Memory safety, C & C++, Memory management
  Postgres's palloc/MemoryContext allocation and setjmp/longjmp-based error handling clash with C++ new/delete, destructors and exceptions: longjmp skips destructors (undefined behavior), exceptions bypass PG\_CATCH, and an uncaught exception aborts the process and forces cluster-wide crash recovery.

## 2026-09-28

- [Can your Postgres survive a bad query?](https://swe.quest/articles/can-your-postgres-survive-a-bad-query-744ea9a22b65710c.md): ClickHouse · 2026-09-28 · Hard · 13 min read · PostgreSQL, Memory management, Resilience, Query engines, Linux
  Postgres's \`work\_mem\` limits memory per plan node per process, not per query, so parallel workers and \`hash\_mem\_multiplier\` can push a simple aggregation past 8x \`work\_mem\`.

## 2026-08-11

- [What's new in pg\_clickhouse v0.10.0: Subqueries, TPC-H Speedups, C Driver, and Aggregates](https://swe.quest/articles/what-s-new-in-pg-clickhouse-v0-10-0-subqueries-tpc-h-speedups-c-driver-and-178ced76a7784be7.md): ClickHouse · 2026-08-11 · Hard · 11 min read · PostgreSQL, Query engines, Analytics & OLAP, SQL, Performance engineering
  pg\_clickhouse v0.10.0 pushes correlated scalar subqueries, IN and NOT IN down to ClickHouse as remote subqueries and anti/semi-joins, raising full TPC-H pushdown from 12 to 16 of 22 queries.

## 2026-08-05

- [What is WAL backpressure, and why does ClickHouse Managed Postgres need it?](https://swe.quest/articles/what-is-wal-backpressure-and-why-does-clickhouse-managed-postgres-need-it-a02421af1a627e86.md): ClickHouse · 2026-08-05 · Hard · 4 min read · PostgreSQL, Resilience, Linux, Storage systems
  ClickHouse Managed Postgres prevents WAL-full PANICs, which happen when writes outpace archiving to object storage, by throttling client write bandwidth with the cgroup v2 I/O controller.

## 2026-07-02

- [How we made ClickStack 5x faster for ClickHouse observability](https://swe.quest/articles/how-we-made-clickstack-5x-faster-for-clickhouse-observability-ed934241e77977aa.md): ClickHouse · 2026-07-02 · Hard · 22 min read · Observability, Analytics & OLAP, Performance engineering, Query engines, Storage engines
  ClickStack's OpenTelemetry logs schema, inherited from the ClickHouse exporter for the OTel Collector, was reworked through a benchmark-driven process.

## 2026-06-25

- [Announcing Silk: a silky smooth fiber runtime for ClickHouse](https://swe.quest/articles/announcing-silk-a-silky-smooth-fiber-runtime-for-clickhouse-bd3ca633b291b6b6.md): ClickHouse · 2026-06-25 · Hard · 11 min read · Concurrency, Runtimes & VMs, C & C++, Performance engineering, Linux
  Silk is a C++ stackful-fiber runtime for ClickHouse. It pins one scheduler thread per CPU, uses io\_uring as its I/O foundation, steals work in order of CPU topology cost (hyperthread sibling, then same socket, then cross-socket), and does zero heap allocation in the steady-state hot path through mmap'd stack pools, stack-resident futures and intrusive containers.

## 2026-06-03

- [How ClickHouse became fast at joins](https://swe.quest/articles/how-clickhouse-became-fast-at-joins-68de042e0ff6c22e.md): ClickHouse · 2026-06-03 · Hard · 15 min read · Query engines, Analytics & OLAP, Performance engineering, SQL
  ClickHouse became 26× faster on the join-heavy TPC-H SF100 workload between 22.4 and 26.4.

## 2026-05-27

- [Introducing multi-stage distributed query execution in ClickHouse Cloud](https://swe.quest/articles/introducing-multi-stage-distributed-query-execution-in-clickhouse-cloud-49bf049f23a569d6.md): ClickHouse · 2026-05-27 · Hard · 14 min read · Query engines, Distributed databases, Analytics & OLAP, Performance engineering
  ClickHouse Cloud adds multi-stage distributed query execution, splitting a query plan into stages connected by exchange operators (Gather, Shuffle, Broadcast, Scatter) so intermediate data can be repartitioned between nodes mid-query.

## 2026-05-22

- [Integrating the Rust Delta Kernel into ClickHouse](https://swe.quest/articles/integrating-the-rust-delta-kernel-into-clickhouse-4dfcdd8e64024cda.md): ClickHouse · 2026-05-22 · Hard · 17 min read · Analytics & OLAP, Rust, C & C++, Build systems, Data pipelines
  ClickHouse replaced its hand-written Delta Lake protocol implementation with the Rust Delta Kernel (delta-kernel-rs).

## 2026-05-14

- [Postgres FDW: Pushdown is a negotiation](https://swe.quest/articles/postgres-fdw-pushdown-is-a-negotiation-623facded31963c6.md): ClickHouse · 2026-05-14 · Hard · 16 min read · PostgreSQL, Query engines, Analytics & OLAP, Performance engineering
  pg\_clickhouse, a Postgres foreign data wrapper for ClickHouse, decides clause by clause how much of a query to push down as ClickHouse SQL.

## 2026-04-21

- [Index sharding in ClickHouse Cloud: Petabyte-scale data needs petabyte-scale indexing](https://swe.quest/articles/index-sharding-in-clickhouse-cloud-petabyte-scale-data-needs-petabyte-scale-162dcf2c4093c588.md): ClickHouse · 2026-04-21 · Hard · 16 min read · Query engines, Analytics & OLAP, Distributed databases, Memory management, Performance engineering
  Index sharding in ClickHouse Cloud splits primary and secondary index analysis across replicas using consistent hashing over data parts.

## 2026-03-24

- [Building high-performance full-text search for object storage](https://swe.quest/articles/building-high-performance-full-text-search-for-object-storage-7061dd61b5d19a17.md): ClickHouse · 2026-03-24 · Hard · 33 min read · Search, Storage engines, Data structures, Analytics & OLAP, Performance engineering
  ClickHouse redesigned its full-text index for object storage, where per-request latency rather than bandwidth is the bottleneck.

## 2026-02-13

- [pg\_stat\_ch: a PostgreSQL extension that exports every metric to ClickHouse](https://swe.quest/articles/pg-stat-ch-a-postgresql-extension-that-exports-every-metric-to-clickhouse-44a394f2889686fc.md): ClickHouse · 2026-02-13 · Hard · 16 min read · PostgreSQL, Observability, Performance engineering, Concurrency, Analytics & OLAP
  pg\_stat\_ch is an open-source (Apache 2.0) PostgreSQL 16–18 extension that captures every statement execution, including failed queries and DDL, as a fixed-size ~4.6KB event with 45 fields and streams it to ClickHouse for APM-style analysis.

## 2026-01-14

- [ClickHouse Release 25.12](https://swe.quest/articles/clickhouse-release-25-12-e571148b4347f1f0.md): ClickHouse · 2026-01-14 · Hard · 18 min read · Query engines, Analytics & OLAP, Performance engineering, Databases
  ClickHouse 25.12 ships 26 features, 31 performance optimizations and 129 bug fixes, led by three query-engine speedups.

## 2025-12-18

- [Taming PostgreSQL GUC “extra” Data](https://swe.quest/articles/taming-postgresql-guc-extra-data-7e376007c1715e0d.md): ClickHouse · 2025-12-18 · Hard · 8 min read · PostgreSQL, C & C++, Memory management, Configuration management
  PostgreSQL GUC check and assign hooks can pre-parse a custom string setting into a structured value, but only if the "extra" data follows the GUC API's memory rules.

## 2025-12-16

- [Parallelizing ClickHouse aggregation merge for fixed hash map](https://swe.quest/articles/parallelizing-clickhouse-aggregation-merge-for-fixed-hash-map-9fc83cd0ed214dc7.md): ClickHouse · 2025-12-16 · Hard · 6 min read · Query engines, Performance engineering, Concurrency, Memory management, C & C++
  ClickHouse 25.11 parallelizes the merge phase for GROUP BY on 8- and 16-bit keys, which use an array-backed FixedHashMap.

## 2025-11-25

- [From OTel to Rotel: Petabyte-scale tracing with 4x greater throughput](https://swe.quest/articles/from-otel-to-rotel-petabyte-scale-tracing-with-4x-greater-throughput-0983bad6d6f660b5.md): ClickHouse · 2025-11-25 · Hard · 25 min read · Observability, Performance engineering, Rust, Stream processing, Analytics & OLAP
  Rotel, a Rust OpenTelemetry collector, sustained 3.7M trace spans/sec (462K per core) on an 8-vCPU gateway writing through Kafka into ClickHouse, versus 1.1M spans/sec (137K per core) for the OTel Collector on the same hardware.

## 2025-11-19

- [chDB Kernel Upgrade Journey: Upgrading ClickHouse to v25.8.2.29](https://swe.quest/articles/chdb-kernel-upgrade-journey-upgrading-clickhouse-to-v25-8-2-29-3cca5f2ad115d794.md): ClickHouse · 2025-11-19 · Hard · 16 min read · Memory management, C & C++, Python, Analytics & OLAP, Performance engineering
  Upgrading chDB's embedded ClickHouse kernel from v25.5 to v25.8.2.29 surfaced allocator conflicts rooted in chDB's dual-library design: a stable-ABI \`\_chdb.abi3.so\` holding the ~120MB engine plus small per-Python-version pybind11 binding libraries.

## 2025-10-28

- [We built a vector search engine that lets you choose precision at query time](https://swe.quest/articles/we-built-a-vector-search-engine-that-lets-you-choose-precision-at-query-time-dd6e891f552187e7.md): ClickHouse · 2025-10-28 · Hard · 20 min read · Vector search, Analytics & OLAP, Storage engines, Performance engineering
  QBit is a new ClickHouse column type that stores BFloat16, Float32 or Float64 vectors as transposed bit planes, each held in a FixedString subcolumn.

## 2025-10-09

- [Making complex JSON 58x faster, use 3,300x less memory, in ClickHouse](https://swe.quest/articles/making-complex-json-58x-faster-use-3-300x-less-memory-in-clickhouse-7431021b1253a468.md): ClickHouse · 2025-10-09 · Hard · 7 min read · Storage engines, Analytics & OLAP, Performance engineering
  ClickHouse v25.8 adds two new on-disk serializations for the JSON type's shared data, which holds paths beyond the 1,024 dynamic-subcolumn limit.

## 2025-09-17

- [Optimizing ClickHouse for Intel's ultra-high core count processors](https://swe.quest/articles/optimizing-clickhouse-for-intel-s-ultra-high-core-count-processors-93479313e687f95e.md): ClickHouse · 2025-09-17 · Hard · 22 min read · Performance engineering, Concurrency, Memory management, Analytics & OLAP, Hardware
  Intel engineers profiled all 43 ClickBench queries on 160–480 vCPU Xeon systems and landed a series of ClickHouse optimizations targeting lock contention, memory management and other scaling bottlenecks.

## 2025-08-07

- [How we made ClickHouse UPDATEs 1,000× faster (Part 3: Benchmarks)](https://swe.quest/articles/how-we-made-clickhouse-updates-1-000-faster-part-3-benchmarks-0d540536665217da.md): ClickHouse · 2025-08-07 · Hard · 17 min read · Analytics & OLAP, Storage engines, Performance engineering, Databases
  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.

## 2025-07-24

- [How we built fast UPDATEs for the ClickHouse column store – Part 2: SQL-style UPDATEs](https://swe.quest/articles/how-we-built-fast-updates-for-the-clickhouse-column-store-part-2-sql-style-412c85fd8f57d493.md): ClickHouse · 2025-07-24 · Hard · 20 min read · Storage engines, Analytics & OLAP, Databases, SQL
  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.

## 2025-07-09

- [No more disks: the architecture behind stateless compute in ClickHouse Cloud](https://swe.quest/articles/no-more-disks-the-architecture-behind-stateless-compute-in-clickhouse-cloud-196ae85c7a09008f.md): ClickHouse · 2025-07-09 · Hard · 18 min read · Analytics & OLAP, Distributed databases, Storage engines, Caching, Cloud platforms
  ClickHouse Cloud compute nodes are now fully stateless and diskless.

## 2025-07-08

- [When SIGTERM Does Nothing: A Postgres Mystery](https://swe.quest/articles/when-sigterm-does-nothing-a-postgres-mystery-0ecf6df7cd549d22.md): ClickHouse · 2025-07-08 · Hard · 11 min read · PostgreSQL, Replication, Debugging, Event-driven architecture
  Creating a logical replication slot on a Postgres hot standby (v16+) can hang indefinitely and ignore pg\_cancel\_backend and pg\_terminate\_backend when a transaction is still open on the primary.

## 2025-04-07

- [Building an Observability Solution with ClickHouse at Dash0](https://swe.quest/articles/building-an-observability-solution-with-clickhouse-at-dash0-f950ba66eb3161c6.md): ClickHouse · 2025-04-07 · Hard · 18 min read · Analytics & OLAP, Observability, Storage engines, Databases, Cost optimization
  Dash0 stores all OpenTelemetry metrics, logs and spans in ClickHouse, using PostgreSQL only for customer settings, so signals can be joined and correlated in one system.

## 2025-03-05

- [The case of the vanishing CPU: A Linux kernel debugging story](https://swe.quest/articles/the-case-of-the-vanishing-cpu-a-linux-kernel-debugging-story-3db1aa1b81ec8319.md): ClickHouse · 2025-03-05 · Hard · 32 min read · Linux, Memory management, Debugging, Performance engineering, Incidents & postmortems
  Intermittent, indefinite CPU saturation of ClickHouse Cloud pods, seen only on GCP, turned out to be a Linux kernel memory-management livelock.

## 2024-10-22

- [How we built a new powerful JSON data type for ClickHouse](https://swe.quest/articles/how-we-built-a-new-powerful-json-data-type-for-clickhouse-cd5f151dcedf8d3e.md): ClickHouse · 2024-10-22 · Hard · 17 min read · Storage engines, Analytics & OLAP, Databases
  ClickHouse's new JSON type stores every JSON path as a true columnar, dense subcolumn, built on two standalone building blocks: Variant and Dynamic.

## 2024-07-22

- [Bonree replaces ZooKeeper with ClickHouse Keeper for drastically improved performance and reduced costs](https://swe.quest/articles/bonree-replaces-zookeeper-with-clickhouse-keeper-for-drastically-improved-6eee02db0b20c225.md): ClickHouse · 2024-07-22 · Hard · 11 min read · Analytics & OLAP, Consensus, Distributed systems, Observability, Cost optimization
  Bonree migrated the coordination layer of its ClickHouse-based observability platform from five 3-node ZooKeeper clusters to a single ClickHouse Keeper cluster.

## 2023-10-03

- [CPU Dispatch in ClickHouse](https://swe.quest/articles/cpu-dispatch-in-clickhouse-5bbf7a6eb81cd552.md): ClickHouse · 2023-10-03 · Hard · 16 min read · C & C++, Performance engineering, Compilers, Hardware, Analytics & OLAP
  CPU dispatch lets a single binary use SIMD instruction sets like AVX2 and AVX-512 while staying compatible with older CPUs: hot functions are compiled for several targets with the target attribute, and the best variant is chosen at runtime using CPUID feature checks.

## 2023-09-29

- [chDB - A Rocket Engine on a Bicycle](https://swe.quest/articles/chdb-a-rocket-engine-on-a-bicycle-951148e84c12126b.md): ClickHouse · 2023-09-29 · Hard · 9 min read · Analytics & OLAP, Memory management, C & C++, Python, Performance engineering
  chDB embeds the ClickHouse engine as an in-process Python module instead of shelling out to the 500MB clickhouse-local binary, using WriteBufferFromVector, Python memoryview and Pybind11 for zero-copy result retrieval.

## 2023-05-24

- [ClickHouse Joins Under the Hood - Full Sorting Merge Join, Partial Merge Join - MergingSortedTransform](https://swe.quest/articles/clickhouse-joins-under-the-hood-full-sorting-merge-join-partial-merge-join-1ae27b9bc393d8f0.md): ClickHouse · 2023-05-24 · Hard · 32 min read · Query engines, Analytics & OLAP, Databases, Performance engineering
  ClickHouse offers two external-sort-based join algorithms that are not memory bound.

## 2023-05-16

- [Hash tables in ClickHouse and C++ Zero-cost Abstractions](https://swe.quest/articles/hash-tables-in-clickhouse-and-c-zero-cost-abstractions-bd1cf29e2582e0a8.md): ClickHouse · 2023-05-16 · Hard · 19 min read · Data structures, C & C++, Performance engineering, Query engines, Analytics & OLAP
  ClickHouse implements GROUP BY and JOIN with a family of open-addressing hash tables generated from a common zero-cost C++ framework, specialized by key type and workload.

## 2023-04-12

- [Speeding up LZ4 in ClickHouse](https://swe.quest/articles/speeding-up-lz4-in-clickhouse-dbbd26281ee7c0df.md): ClickHouse · 2023-04-12 · Hard · 32 min read · Performance engineering, Storage engines, C & C++, Algorithms, Analytics & OLAP
  LZ4 decompression often tops ClickHouse query profiles because highly compressible, cached columnar data shifts the cost onto CPU, yet storing data uncompressed proved impractical due to disk space.

## 2023-02-16

- [Five Methods For Database Obfuscation](https://swe.quest/articles/five-methods-for-database-obfuscation-477824be1d934bc1.md): ClickHouse · 2023-02-16 · Hard · 23 min read · Analytics & OLAP, Privacy, Performance engineering, Testing, Algorithms
  ClickHouse needed publishable benchmark data that kept the properties driving analytical query performance in its private web analytics dataset: compression ratio, per-column and cross-column cardinality, and value distributions such as power laws.

## 2022-11-23

- [JIT in ClickHouse](https://swe.quest/articles/jit-in-clickhouse-a3bd9587dc26e5d4.md): ClickHouse · 2022-11-23 · Hard · 27 min read · Compilers, Query engines, C & C++, Performance engineering, Analytics & OLAP
  Just-in-time compilation is built up from first principles: hand-encoding x86-64 instructions into an mmap'd executable page, calling back into host functions via pointers, and reading ELF sections to see where code and constants live.

Same list as RSS: [https://swe.quest/feed.xml?source=clickhouse&difficulty=hard](https://swe.quest/feed.xml?source=clickhouse&difficulty=hard). Lists take `?page=`, `?per=12|24|48|96` and, on the home page, `?tag=` (up to 3), `?source=`, `?difficulty=easy|medium|hard` and `?search=`.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
