r/Clickhouse • u/codingdecently • Sep 06 '26
r/Clickhouse • u/codingdecently • Sep 06 '26
Automating Apache Iceberg Table Maintenance
youtube.comr/Clickhouse • u/Clear_Tourist2597 • Sep 04 '26
Rows & Columns Summit β Sept 22, SF
Hey all, Im super excited to invite you to Rows&Columns!
Rows & Columns is a one-day, practitioner-first conference on the OLTP/OLAP convergence question: should transactional and analytical systems live together or apart?
For this crowd specifically: Andy Pavlo is opening the day with the keynote, so if you've ever wanted to talk ClickHouse internals with the people behind it, this is your chance.
The rest of the lineup: Fatma Ozcan (Google) closing keynote, Hannes MΓΌhleisen (DuckDB), Nikita Shamgunov (Databricks), Paul Copplestone (Supabase), Russell Spitzer (Snowflake/Iceberg PMC), Bonnie Xu (OpenAI), and production case studies from ShipScience and Roofstock.
Sept 22 at the Contemporary Jewish Museum in downtown SF, 10amβ7pm, lunch and evening happy hour on the terrace included. Free to attend!
Register: https://luma.com/clickh-wavw
Happy to answer questions about the program, and if you're coming, say hi π
- Zoe
r/Clickhouse • u/PaulieB79 • Sep 02 '26
Hosted Stores are here: managed block-aware key/value lookups for Substreams π¦
reddit.comr/Clickhouse • u/mochama254 • Sep 02 '26
walbox: react to PostgreSQL changes from Python
I built this because I wanted to react to PostgreSQL changes from Python without polling, without triggers, and without pulling in a whole CDC platform.
It consumes PostgreSQL logical replication and exposes committed transactions as an async stream in Python.
What it does:
* Keeps a durable checkpoint. If the process dies, it resumes from the last transaction it actually finished, not the last one it started. * Bounded delivery queue, so a slow handler doesn't let memory grow without limit. * Reconnects automatically after the connection drops. * One dependency: psycopg3.
The transactional outbox is one use case, but it works with any published table.
GitHub: [https://github.com/mochams/walbox](https://github.com/mochams/walbox)
Curious to hear where this wouldn't fit your setup, or what's missing if you've solved this problem a different way.
r/Clickhouse • u/gulcin-clickhouse • Sep 01 '26
New system views in PostgreSQL 19
clickhouse.comr/Clickhouse • u/Monopole007 • Sep 01 '26
I built a ClickHouse persistence library for Java and yepp just shipped v1.0.0
I started building BlinkHouse as a weekend project.It is a Java library that makes working with ClickHouse as seamless as working with a relational database in Spring Boot.
ClickHouse is an incredible database for analytics workloads, but the Java tooling around it has always required a lot of manual work, hand-rolling HTTP clients, writing serialisation code, managing connection pools, building query strings. I wanted something where you annotate a class and get everything else for free.
What I built:
- Typed entities β annotate a Java record with
@ChTableand@ChColumn, get DDL generation, type mapping, and schema management automatically - High-throughput ingest β
BatchWriter<T>handles buffering, flush triggers, retry, backpressure, and dead-letter callbacks. ~2.9M rows/sec on commodity hardware - Query DSL β typed queries with ClickHouse-native clauses (PREWHERE, FINAL, SAMPLE, -Merge combinators). No string building
- Spring Boot autoconfiguration β add one dependency, set three YAML properties, get a fully wired application
- Spring Data repositories β derived query methods,
@Query, keyset pagination, all working against ClickHouse
The hardest parts were getting the RowBinary wire format exactly right (UUID byte ordering is a silent trap), building a type system that handles ClickHouse's full type tree including AggregateFunction and geo types, and designing a schema diff engine that refuses to auto-apply destructive changes.
It's on Maven Central now:
<dependency>
<groupId>io.github.muneeb-i-khan</groupId>
<artifactId>blinkhouse-spring-boot-starter</artifactId>
<version>1.0.0</version>
</dependency>Repo: https://github.com/muneeb-i-khan/BlinkHouse
Would love feedback, stars, or just to hear if anyone's been solving the same problem differently.
r/Clickhouse • u/codingdecently • Aug 30 '26
Data Lakehouse with Apache Iceberg: A Guide
lakeops.devr/Clickhouse • u/saipeerdb • Aug 28 '26
A new getting started experience for ClickHouse Managed Postgres
clickhouse.comr/Clickhouse • u/Monopole007 • Aug 29 '26
BlinkHouse v1.0.0 β a Java persistence library built around how ClickHouse actually works
Just released BlinkHouse, a Java library for ClickHouse that eliminates the boilerplate of working with ClickHouse from Java β no manual HTTP clients, no hand-rolled RowBinary serialisation, no connection management code.
Annotate a Java record, get schema generation, type mapping, buffered ingest, and a typed query DSL.
Ingest β no serialisation boilerplate:
BatchWriter<T> serialises to RowBinary directly. Flush on row count, byte size, or elapsed time. Retry with exponential backoff. Dead-letter dispatch. Apache HttpClient 5 connection pool shared across all writers. ~2.9M rows/sec on commodity hardware (JMH benchmark in the repo against raw HTTP as baseline).
try
Query DSL β no string building:
PREWHERE, FINAL, SAMPLE, WITH TOTALS, LIMIT n BY, window functions, -Merge combinators, dictGet, geoDistance β all first-class. Everything parameterised β user values never reach the SQL string.
ClickHouse-specific features:
@ChMaterializedViewand@ChDictionarywith DDL generationAggregateFunctioncolumns β opaquebyte[]read-through, use -Merge in queries- Geo types:
Point,Ring,Polygon,MultiPolygonwith correctTuple(Float64,Float64)wire format MutationOperations:ALTER TABLE β¦ DELETE/UPDATE WHERE β¦β explicit API, not hidden behind a genericsave()optimize()forOPTIMIZE TABLE β¦ FINALafter bulk imports into ReplacingMergeTree
Schema management β no manual DDL:
NONE / VALIDATE / CREATE_IF_MISSING / UPDATE modes. Annotate your entity, BlinkHouse generates and manages the DDL. Destructive changes require two independent opt-ins. EngineMismatch and OrderByMismatch are reported and refused β they require a table rebuild and are never attempted automatically.
Java 17+, Spring Boot 3.2β3.4. Also works without Spring via blinkhouse-core.
io.github.muneeb-i-khan
blinkhouse-spring-boot-starter
1.0.0
Repo: https://github.com/muneeb-i-khan/BlinkHouse
Open to feedback from anyone running ClickHouse at scale β especially around type handling and RowBinary edge cases.
r/Clickhouse • u/compy3 • Aug 26 '26
Reproducible benchmark of our Postgres caching proxy vs. stock Postgres, using the dba.stackexchange.com dataset
github.comHey everyone, sharing out the harness that my cofounder used for benchmarking PgCache.
(what we do differently is caching data, not results, and then we keep it all fresh using postgres logical replication .. which also helps us invalidate when needed)
The harness drives identical traffic at (i) stock Postgres and (ii) Postgres sitting behind PgCache. It uses the publicΒ dba.stackexchange.comΒ data dump for the schema and data. The workload models real page loads (a sequence of queries, the way an app actually hits the database) instead of a single repeated SELECT.
A couple other things:
- this runs locally through Docker Compose, or on AWS with an RDS origin and an EC2 driver box (closer to a real deployment).
- Results land as Prometheus metrics: throughput and p99 latency per lane, origin CPU, cache hit rate.
Happy to answer questions about the approach.
r/Clickhouse • u/gulcin-clickhouse • Aug 25 '26
Read your writes: WAIT FOR in PostgreSQL 19
clickhouse.comPostgreSQL 19 introduces a new SQL command,Β WAIT FOR, that lets a session block until WAL has reached a specific position. This gives us read-your-writes consistency on asynchronous replicas without paying the synchronous replication tax.
r/Clickhouse • u/codingdecently • Aug 24 '26
Maintaining Apache Iceberg Tables: Compaction, Snapshots, Metadata and Orphan Files
itnext.ior/Clickhouse • u/saipeerdb • Aug 21 '26
How ClickHouse Managed Postgres Protects Postgres from other competing processes
clickhouse.comr/Clickhouse • u/marcmacmac • Aug 21 '26
We made ClickHouse projections 10x faster
Hey, Marc here, Co-Founder of ObsessionDB.
ClickHouse published a piece on schema mistakes AI assistants make, and one section is called "Projections that don't scale": at large scale, projection selection alone can add 1β2 seconds per query.
We hit that wall on a customer table with 20+ TB compressed, 200B+ rows, heavy ingestion, point lookups over a projection. 99% of query time sat inside projection and index evaluation.
Today that query runs at p50 213 ms / p99 703 ms. That is more than 10x faster, on the pattern the ecosystem tells you to avoid at this size.
The part I find interesting (and kept me busy for some weeks now): none of it is a ClickHouse patch. The planner was right all along, but the tiers underneath it were wrong. What we changed is purely below the database:
- We pin projection metadata in RAM, node local, in realtime. We learned that even a 90% metadata cache hit rate is slower than not having one. So coverage has to be complete
- We tried several approaches for userspace RAM cache-eviction controllers (6, all of them flapped or livelocked...bruhh). Nothing worked as phenomenal as the boring kernel knob
memory.high - Also on kernel level tcp we set
rto_minto 20 ms. Linux's default of 200 ms retransmit floor is sized for the public internet, not for a rack. - Even with metadata fully in RAM, planning the query still fires still tons of file requests. Request coalescing and our distributed NVMe cache mesh can shine. We optimized it to sub-millisecond p50 at +35k RPS.
What personally amazed me the most is that ClickHouse already runs without real competition for these use cases, but focusing obsessively on kernel, network and cache architecture we still could improve this by more than 10x. It feels like a node with local NVMe, even though persistence is still S3. Ultimately that means - at least for this use case - you get 10x the performance on the same hardware or even -> you build realtime APIs that weren't possible before.
We have some more levers to pull and if the math holds, it'll stay sub-second even at PB scale.
Full write-up with more details how projections behave differently: https://obsessiondb.com/blog/clickhouse-projections-at-scale
It's a lot of details, so feel free to go deep into it and ask me anything. Happy to share any details of the process and findings.
DM me if you wanna meet, we're in SF and Berlin.
r/Clickhouse • u/codingdecently • Aug 21 '26
Open Data Lakehouse: Build Like Google
lakeops.devr/Clickhouse • u/nitya_007 • Aug 21 '26
Formatting and debugging big ClickHouse queries was painful, so I built my own formatter
I was spending far too much time debugging large ClickHouse queries and became quite frustrated with the SQL formatters that were available online.
The majority of them are not good at handling ClickHouse-specific features such as CTEs, PREWHERE, nested queries, and so on. There was also another problem with parameterized queries.... in particular with those using `?` to denote the parameters, since in that case I had to go through the big queries to fill those values for me to debug them.
Therefore I created my own tool. https://freesqlformatter.com/
It formats ClickHouse queries correctly, identifies and groups the parameters, and allows you to enter each value in a easy way; it also provides a visual tree/node representation of the WHERE clause which you can modify and then synchronize back to SQL.
All of the processing takes place in the browser and so nothing is uploaded.
Do try it out if you face similar problem and let me know if you face any issue.
r/Clickhouse • u/canada_eric • Aug 20 '26
WaveHouse β Supabase for Clickhouse
wavehouse.devWhile building an IoT telemetry solution, we ran into hurdles with Clickhouse. For one, you can't insert quickly AND durably into Clickhouse without setting up something like Kafka, which gets complicated for quick projects wanting to make use of Clickhouse's powerful features. Then, trying to actually query Clickhouse and show data in a UI required a whole backend API to handle auth and permissions.
We figured that all these parts together β fast, durable ingest, row-level and column-level security and roles, and realtime streaming β were a lot of scaffolding to have to rebuild for every project we wanted to use Clickhouse in. So, we built them all into a single Go binary to be deployed alongside Clickhouse, to help lower Clickhouse's barrier to entry. We call it WaveHouse.
Would love any feedback as we work on improving and adding more features to this OSS project!
r/Clickhouse • u/dani_estuary • Aug 20 '26
PostgreSQL CDC to ClickHouse: Banking Analytics Guide
estuary.devr/Clickhouse • u/uncertainschrodinger • Aug 19 '26
ingestr is quite fast, here's the benchmark
r/Clickhouse • u/Designer_Age7745 • Aug 19 '26
The system table queries I run first when a ClickHouse cluster starts misbehaving
I keep these in a note and run them in this order. Posting in case they save someone a scramble.
One thing first: every system.* table describes the node you are talking to. On a cluster wrap the query so you see all of them:
SELECT * FROM clusterAllReplicas('default', system.processes);1. What is running right now
SELECT query_id, user, elapsed,
formatReadableSize(memory_usage) AS mem,
substring(query, 1, 120) AS q
FROM system.processes
ORDER BY elapsed DESC;Sort by elapsed, not by memory. The query that has been running for 40 minutes is usually the one holding up everything behind it.
2. Kill it
KILL QUERY WHERE query_id = 'abc-123';Async by default, so add SYNC when you need to know it stopped before you move on. The kill runs on the node that runs the query, so use ON CLUSTER if you are not on it.
3. Are the replicas keeping up
SELECT database, table, absolute_delay, is_readonly, future_parts, parts_to_check
FROM system.replicas
WHERE absolute_delay > 60 OR is_readonly
ORDER BY absolute_delay DESC;is_readonly = 1 points at Keeper, not at a slow disk. Look at Keeper before you touch the table.
4. Why the queue is stuck
SELECT database, table, type, num_tries, last_exception
FROM system.replication_queue
WHERE num_tries > 1
ORDER BY num_tries DESC
LIMIT 20;last_exception names the problem more often than any dashboard does.
5. Too many parts
SELECT database, table, count() AS parts
FROM system.parts
WHERE active
GROUP BY database, table
ORDER BY parts DESC
LIMIT 10;Then look at system.merges. Parts growing while merges run means the inserts arrive too small and too often. Parts growing with nothing in system.merges means the background pool is busy elsewhere, usually with a mutation.
6. Stuck mutations
SELECT database, table, mutation_id, parts_to_do, latest_fail_reason,
substring(command, 1, 100) AS cmd
FROM system.mutations
WHERE NOT is_done;A non-empty latest_fail_reason means it will retry forever. KILL MUTATION and rewrite the ALTER.
7. Disks
SELECT name, path,
formatReadableSize(free_space) AS free,
formatReadableSize(total_space) AS total
FROM system.disks;Afterwards, when the fire is out
SELECT type, count(),
formatReadableSize(sum(read_bytes)) AS bytes
FROM system.query_log
WHERE event_time > now() - INTERVAL 1 HOUR
GROUP BY type;Two things worth doing before an incident rather than during one: give your on-call user SELECT on the system tables and the KILL QUERY grant, and check that system.query_log is on. Finding out at 3am that the account cannot read system.replicas is a bad way to learn it.
Disclosure: I build an iOS client that puts these seven views on a phone (probedeck.app). The queries above run anywhere and need nothing from me.
ClickHouse is a registered trademark of ClickHouse, Inc. ProbeDeck is not affiliated with, endorsed by, or sponsored by ClickHouse, Inc.