Loading…

Clickhouse
High-performance open-source columnar database management system designed for real-time analytics and data warehousing at scale
- 292 posts summarised
- latest
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
From their blog
Latest articles
Why BigQuery can’t match ClickHouse Cloud for real-time analytics
ClickHouse Cloud delivered 438× better end-to-end performance per dollar than BigQuery under Capacity pricing, and 512× under On-demand pricing, while continuously ingesting 113.2 billion stock-market quotes. The CostBench methodology measures preparation cost, query cost, and query runtime as data arrives. ClickHouse Cloud led in all three components: preparation cost was 8.5× lower than BigQuery Capacity, normalized query cost was 94× lower, and accumulated query runtime was 50.8× lower. The difference originates in how each system handles incoming data: ClickHouse orders raw data and builds current summaries during inserts, while BigQuery makes new rows queryable before background clustering and materialized view refresh complete. This leaves BigQuery aggregate queries to include rows that refresh has not yet summarized, increasing cost and runtime.
🗽 Postgres Summit US 2026 retrospective
ClickHouse sponsored Postgres Summit US 2026 in New York City, where David Wheeler presented “Postgres in da ClickHouse” on integrating Postgres and ClickHouse for OLTP and OLAP workloads. He demoed four technologies: pg_stat_ch for query metrics, pg_clickhouse for querying ClickHouse from Postgres (pushing down 16 of 22 TPC-H queries and supporting nearly all Postgres data types), chdb_hook for efficient data lake file import/export via COPY (outperforming similar extensions), and WalShadow for sub-second physical replication. Other sessions covered pg_plan_advice in Postgres 19, index prefetching for Postgres 20, open source CDC plugins, and a graveyard of technologies that failed to “kill” SQL. Wheeler also attended talks on Postgres replication, African Postgres communities, and CloudNativePG extensions. The conference marked ClickHouse’s first Postgres conference sponsorship, with plans to sponsor PGConf.EU in Valencia.
Why Databricks can’t match ClickHouse Cloud for real-time analytics
The CostBench benchmark streamed 113.2 billion stock-market quotes at one million rows per second while running aggregate and drill-down queries to compare ClickHouse Cloud and Databricks for real-time analytics under continuous ingestion. ClickHouse Cloud delivered 752× better end-to-end performance per dollar than the Databricks stack using Serverless SQL, Zerobus Ingest, liquid clustering, and incremental materialized views. ClickHouse Cloud led in all three components: preparation cost ($28.69 versus 695.60), normalized query cost ( 0.05 versus $2.65), and accumulated query runtime (56.39 seconds versus 29.10 minutes). The gap stems from ClickHouse preparing ordered raw data and current summaries on the insert path, while Databricks requires separate clustering and refresh services that cost more and can leave queries with unfinished layout work. Databricks’ new Lakehouse//RT, still in beta, was not included in this comparison.
Executable UDFs are now generally available on ClickHouse Cloud
Executable user-defined functions (UDFs) have moved from public beta to general availability on ClickHouse Cloud across AWS, GCP, and Azure. The GA release adds a Native runtime for precompiled statically linked binaries in Rust, Go, C++, and JavaScript, requiring both amd64 and arm64 architectures, alongside the existing Python support. UDFs now have network access to public endpoints, a per-process memory limit, a deterministic flag that enables query caching, and are not billed separately, running inside service pods. ClickHouse 26.6+ provides eight ProfileEvents counters and two asynchronous metrics for per-query UDF cost monitoring, and the Cloud API and Terraform provider support UDF management with per-service version pinning. The post demonstrates counting LLM tokens and grading completions using these UDFs, showing how to put tokenization libraries next to the data in ClickHouse.
What is direct I/O, and why does ClickHouse Managed Postgres use it for backups?
A base backup reads every byte of a live database off the same NVMe drives that serve queries. Buffered reads go through the kernel page cache, evicting warm database pages and adding a kernel copy per byte. Direct I/O skips the cache, leaving Postgres’s warm data in place, but also disables kernel readahead. On a RAID0 array, small direct reads hit only one drive, so ClickHouse Managed Postgres sizes each direct read to span the whole stripe and scales the reader count to the hardware. On a 48 vCPU box with four NVMe drives and a 467 GB database, the direct I/O backup evicted nothing, cut query latency impact by about two thirds, used about 14% less CPU, and finished in 71 seconds.
How LinkedIn extended ClickHouse from distributed tracing to metric discovery and analytics
LinkedIn’s observability team first deployed ClickHouse for distributed tracing, where even at 1% head sampling the system generates 0.8 trillion spans and 200 TB of uncompressed data per day across three data centers. They then extended ClickHouse to consolidate a legacy metric metadata system built on RRDtool semantics, which had grown into three separate services that had reached their scaling limits. The new single-shard ClickHouse index serves over 150,000 queries per minute with an average latency of 68 milliseconds across 13 billion-plus metrics with 30% daily turnover. Migrating off the legacy stack reduced memory use to roughly one-fifth and compute to about two-thirds, with enough headroom to double the metric volume. By exposing individual dimensions as columns, the index enables engineers to replace regex-heavy queries with efficient native ones, supporting the larger migration away from RRD semantics.
Introducing SCIM Provisioning in ClickHouse Cloud
ClickHouse Cloud introduces SCIM 2.0 provisioning, making the identity provider the single source of truth for user membership and role assignments. Previously, SAML SSO handled authentication but left user invites and role updates as manual tasks, creating security risks. SCIM provisioning automatically syncs user create, update, and delete operations from the IdP using standard SCIM 2.0 endpoints, maps IdP groups to custom ClickHouse roles via stable external IDs, supports up to two API keys for rotation, and provides audit logging for all provisioning actions. The feature requires an active SAML connection, is limited to verified domain SSO users, excludes system roles like Admin, and revokes all keys if SAML is disabled. It is generally available for Enterprise and BYOC organizations, validated with Okta and Microsoft Entra ID, and eliminates manual invite and deprovisioning tasks.
pg_clickhouse & chdb updates: Encoding, nesting, and types
pg_clickhouse v0.11.0 and the chdb extension v0.1.2 continue their focus on cross-database compatibility between ClickHouse and PostgreSQL with several enhancements derived from header-only C libraries. A new check_encoding server option provides error handlers for invalid byte sequences in text columns: fail, remove, replace, and truncate, with replace displaying the Unicode replacement character for UTF-8 databases. ClickHouse Interval types such as IntervalMillisecond are now imported as PostgreSQL interval columns, and expressions like start_at + duration are pushed down to ClickHouse. Unflattened Nested columns are mapped to two-dimensional text arrays by default, or to arrays of composite types when a structure is specified; parameterized JSON columns are mapped to jsonb with proper ORDER BY pushdown. Additional type mappings include Int128 and UInt256 to numeric, BFloat16 to float4, and spatial types; the deprecated clickhouse_raw_query function was removed, and PostgreSQL 13 support was dropped.
Memory safety for Postgres extensions in C/C++
Postgres MemoryContext allocation combined with setjmp/longjmp error handling bypasses C++ destructors, leading to undefined behavior when C++ code runs inside a Postgres extension. C++ exceptions also bypass PG_CATCH, and an uncaught exception in a background worker aborts the process, forcing the postmaster to restart everything due to potential shared memory corruption. ClickHouse’s four Postgres extensions each used a different approach: pg_clickhouse replaced clickhouse-cpp with a new C library, pg_re2 scoped C++ to a single file, pg_chdb isolated libchdb in a helper executable, and pg_stat_ch uses a terminate handler. pg_chdb’s helper process runs outside the Postgres backend, so a libchdb crash fails only the calling operation without triggering cluster crash recovery. A long-term plan for pg_stat_ch moves its C++ dependencies into a helper executable, with PR #129 as the first step to isolate C++ from Postgres code.
ClickHouse expands collaboration with Microsoft, bringing Fabric integration, deeper OneLake interoperability, and enterprise deployment flexibility
ClickHouse announced a significant expansion of its strategic collaboration with Microsoft at The European Microsoft Fabric + SQL Community Conference, including the public preview of a native ClickHouse workload for Microsoft Fabric that brings sub-second analytical query latency to OneLake. The company also made generally available the ability to read Apache Iceberg tables from OneLake using OneLake Table APIs, and introduced a public preview of writing Iceberg tables back to OneLake. These capabilities eliminate data duplication and ingestion steps, allowing teams to keep OneLake as the governed single source of truth while leveraging ClickHouse’s speed. ClickHouse Bring Your Own Cloud (BYOC) is now available in the Microsoft Marketplace, enabling customers to run ClickHouse Cloud inside their own Azure tenant with full control over IAM, networking, and encryption. The integrations aim to serve real-time agentic workloads, interactive dashboards, and observability without separate cluster provisioning or ETL pipelines.
ClickHouse Workload for Microsoft Fabric: sub-second analytics on OneLake, now in public preview
The ClickHouse workload for Microsoft Fabric brings ClickHouse as a native acceleration layer for OneLake, now in public preview. It provisions dedicated ClickHouse Cloud services on Azure via the Fabric Extensibility Toolkit, using a ClickHouse item in the workspace. Users sync OneLake tables through ClickPipes as point-in-time snapshots with no ingestion charges. The embedded SQL console and external tools (Power BI, Copilot Studio, GitHub Copilot) can then query billions of rows with sub-second response times at high concurrency. Planned future features include write-back to OneLake, continuous sync, permission sync, and deeper Power BI integration.
ClickHouse now writes Apache Iceberg tables to Microsoft OneLake
ClickHouse previously wrote Iceberg tables to object storage without catalog registration, limiting their discoverability. Now it writes Iceberg tables directly to Microsoft OneLake, registering in the catalog via Iceberg REST Table APIs and securing with OneLake Security. Use cases include AI agents monitoring order data and publishing real-time anomaly detection results to OneLake, and applications writing directly via ClickHouse without a separate ingestion layer. The connection uses the DataLakeCatalog engine with catalog_type=‘onelake’, warehouse parameter combining workspace and lakehouse IDs, and Microsoft Entra ID service principal authentication; writing uses standard INSERT INTO syntax with backtick-quoted namespace.table names. OneLake automatically syncs Iceberg and Delta Lake formats, provides governance with lineage tracking and data protection, and its security APIs are opening to third-party engines; this is the first catalog to support writes from ClickHouse, with more catalogs planned.
Can your Postgres survive a bad query?
Postgres memory tuning is difficult because work_mem applies per operation, not per query, and parallel workers multiply memory usage without a query-wide cap. Some executor structures, such as those in recursive queries, have no disk-backed fallback and can grow until the backend runs out of memory. A benchmark using a recursive query that exhausts memory tested ClickHouse Managed Postgres, Cloud SQL, PlanetScale, and Amazon RDS on 16 GiB instances. ClickHouse Managed Postgres enforces a memory ceiling at 57% of host RAM, rejecting queries that exceed it, while RDS allows backends to consume nearly all RAM until the host crashes. Cloud SQL and PlanetScale enforce similar caps, but ClickHouse Managed Postgres’s ceiling is lower, a deliberate tradeoff that returns clean query failures instead of forcing every client through crash recovery.
chDB Durable Layer for agent memory
Agent memory built on chDB, an embedded SQL OLAP engine, accumulated state such as project rules, user preferences, and recall traces on a single laptop. Moving that memory to CI, sandboxes, or another laptop broke the local-disk assumption because the MergeTree directory existed on only one disk. Adding a ClickHouse server backend fixed portability but turned every recall into a network round trip. The chDB Durable Layer fills the gap by keeping the local analytical hot path while publishing authoritative state to object storage (S3, GCS, or Azure Blob). Applications write to a local working copy and use flush() to publish writes and checkpoint() to compact the log, avoiding a sidecar or database server. The contract supports Python, Node, Go, and Rust bindings with cross-binding recoverability.
ClickHouse release 26.9
ClickHouse 26.9 ships with 56 new features, 135 performance optimizations, and 464 bug fixes. Among the highlights are conditional LIMIT boundaries that control output based on ordered stream values, incremental refreshes for append-only materialized views, and disk spilling for high-cardinality DISTINCT queries that automatically spills when memory usage reaches half the limit. The CREATE TOKEN feature issues time-limited credentials with a default lifetime of 30 minutes and restricted privileges, reducing the impact of leaked keys. Arithmetic operations between DateTime and Time types now support configurable overflow behaviors—throw, saturate, or ignore. PromQL support expands in a private preview on ClickHouse Cloud, bracket syntax simplifies JSON subcolumn access, and queries for min, max, and count receive performance improvements.
How Fountain rebuilt its data plane on ClickHouse Cloud to power Cue, the Frontline Superintelligence
Fountain rebuilt its data plane on ClickHouse Cloud to power Cue, its agentic AI platform for frontline hiring, moving off a multi-vendor BigQuery and S3/Iceberg batch stack. The migration cut analytics latency from three hours to under two minutes, with most queries returning in under a second, at roughly 66% lower cost. Data from 13 Postgres production databases and four MongoDB databases streams into ClickHouse Cloud via ClickPipes managed CDC, landing as Iceberg and Parquet in S3 before reaching BigQuery and ClickHouse. The new architecture uses two symmetrical pipelines—one for Postgres, one for MongoDB—each running a short path: source, ClickPipes, materialized views, and Cue. The system now carries 8.48 billion CDC rows replicated continuously by ClickPipes and 10.3 billion analytics rows across 15 deployments, served by over 2,000 incremental materialized views.
ClickHouse appoints Mike Scarpelli, former Snowflake and ServiceNow CFO, to Board of Directors
ClickHouse appointed Michael Scarpelli, former CFO of Snowflake and ServiceNow, to its Board of Directors as an independent director and chair of the Audit Committee. Scarpelli previously guided three companies through initial public offerings and said ClickHouse is redefining the category for real-time and agentic workloads. The company has surpassed $350 million in annualized revenue, up from roughly $200 million at the end of 2025, and achieved a $15 billion valuation in its Series D round, with over 4,000 customers including DoorDash, Meta, Tesla, and Visa. ClickHouse now employs nearly 800 people across 27 countries, plans to reach 1,000 by year-end, and derives more than half its revenue from outside the United States as it scales its enterprise motion. The appointment is part of a deliberate build-out of finance and governance capabilities, including the 2025 hire of CFO Jimmy Sexton, who also came from Snowflake.
Postgres on NVMe: performance and the convergence of transactions and analytics
The post examines how local NVMe storage changes Postgres performance, particularly when working sets exceed memory and disk latency becomes the bottleneck. It argues that while faster storage accelerates transactional workloads, it does not alter the row-store layout, so analytical queries still require different approaches. Benchmark results show 9.2× more throughput on NVMe, with a median of 16,030 TPS versus 1,734 on EBS. The post introduces WalShadow, an open-source replication engine that reads the physical Postgres WAL to enable sub-second replication to ClickHouse without logical slots. It concludes that failover is solvable with tools like Patroni, and that storage latency is only part of the performance problem.
The official ClickHouse provider for Apache Airflow is now available
Apache Airflow users can now use an upstream ClickHouse provider, offering an officially maintained alternative to community plugins or custom integration code. The provider, apache-airflow-providers-clickhousedb, uses ClickHouse Connect over HTTP(S), integrates with Airflow’s common SQL framework, and supplies ClickHouseHook for bulk inserts, streaming, and client-specific operations. The post documents installation, connection setup, standard SQLExecuteQueryOperator DAGs, bulk insertion, and local or managed deployment through Astronomer, including TLS settings for ClickHouse Cloud. Production examples include Astronomer’s Astro Observe, Chartmetric’s 15-million-row playlist pipeline every five minutes, and ClickHouse’s warehouse, which schedules 76 DAGs across more than 40 sources and moves about 6 billion rows daily. The provider is available now, with future capabilities guided by community requests.
Postgres week in the Netherlands: PGDay Lowlands & Percona Live 2026
An account of three days in the Netherlands covers talks at PGDay Lowlands in Utrecht and Percona Live 2026 in Amsterdam, including a five-minute presentation on ClickHouse integrations and a PostgreSQL 19 monitoring session. pg_clickhouse uses a foreign data wrapper to expose ClickHouse tables as PostgreSQL foreign tables, allowing existing queries, ORMs, and dashboards to continue working while pushable work runs in ClickHouse; 15 of 22 TPC-H queries at scale factor 1 are fully pushed down. pg_stat_ch captures per-query execution events in a shared-memory ring buffer and sends batches to ClickHouse, dropping events rather than blocking PostgreSQL when ClickHouse is unavailable. The monitoring talk covered PostgreSQL 19 logging, WAL and I/O statistics, WAIT FOR, new system views, and multixact and wraparound changes. The post also reports talks on optimizer hints and plan stabilization, and says both conferences will return in 2027.
Topics they write about
All topics →Weekly digest
The best engineering reads, once a week.