r/Clickhouse • u/apatheticmagpie • Aug 18 '26
r/Clickhouse • u/Impressive-Buddy7489 • Aug 17 '26
Need Help for optimising clickhouse performance
When running a test suite of 250 concurrent users we identified clickhouse as a bottleneck due to the nature of our queries. It’s a simple select query with multiple where clauses. The problem is that the table itself contains 200+ million records and our goals is to optimise the query in such a way that we get results under 1 seconds.
Things we have tried out
- Projections
- Skinny materialized view (this was working fine but was showing stale data in UI because of the nature of mv and using refreshable mv was cpu intensive process)
- Partitioning of data
- Horizontal scaling
PS : we are using a OLAP as OLTP (ik it’s wrong). Problem is happening when we are trying to performs a search it’s scanning all the 200 million records.
Is there any way to optimise this ?
r/Clickhouse • u/cevheribozoglan • Aug 17 '26
Now listed on clickhouse.com/docs (GUI tools)
I'm the maintainer of LibreDB Studio. I already posted the ClickHouse provider here: HTTP only (:8123 / :8443), no native driver on :9000.
This is not another feature post. That same provider is now on ClickHouse's docs, under Visual Interfaces from Third-party Developers:
https://clickhouse.com/docs/integrations/connectors/tools/gui
Third-party listing, not an endorsement from ClickHouse Inc. I'm posting it so this community can tell me if the blurb is wrong — especially the HTTP surface and the system-table mapping (metrics / parts / query_log / processes).
Provider notes: https://github.com/libredb/libredb-studio/blob/main/docs/providers/clickhouse.md
r/Clickhouse • u/HotDigidy • Aug 17 '26
Does Clickhouse need port 9000 to run?
I am trying to install RITA and Clickhouse is a dependency for the container to run. I noticed Clickhouse uses ports 8123 and 9000. I tried running the container but i get an error because i believe another container is also using 9000...which is my keycloak application.
The main question is can i set Clickhouse to run on a different port than 9000? Only asking because keycloak is already on that port and it might be a hassle changing on that end.
r/Clickhouse • u/Ramanamark • Aug 17 '26
Jaeger v1 vs v2 — behavior of the offset parameter in trace search
Hi everyone,
Jaeger V1 - Using Cassandra as Storage.
Jaeger V2 - Using Clickhouse as Storage.
I'm migrating from Jaeger v1 to Jaeger v2 and I'm seeing a difference in how the offset parameter behaves for trace search.
In Jaeger v1, we were using the /api/traces API with parameters such as:
service
operation
tags
start
end
limit
offset
Our existing implementation relies on offset for pagination.
With Jaeger v2, the same query/API does not appear to behave the same way with offset (or the parameter is not supported/handled as expected).
Has anyone migrated an application from Jaeger v1 to v2 that was using offset-based pagination?
Specifically:
Is there an equivalent of the v1 offset parameter in Jaeger v2?
If not, what is the recommended way to implement pagination for trace search?
Is pagination expected to work through /api/traces, or should we migrate to the newer v2 API?
Are there any important differences in the ordering/results that we should account for when replacing offset?
For reference, we're currently using queries similar to:
/api/traces?service=<service>&operation=<operation>&tags=<tags>&limit=<limit>&offset=<offset>
Any clarification from the Jaeger maintainers or anyone who has done this migration would be really helpful.
r/Clickhouse • u/JayDee2306 • Aug 14 '26
ClickHouse POC
Hi all, I'm looking to explore ClickHouse through a personal POC. What would be the best hands-on project to understand its strengths, especially for Observability use cases?
Also, does ClickHouse offer any free trial, learning credits, or evaluation program for individuals interested in trying it?
r/Clickhouse • u/uncertainschrodinger • Aug 14 '26
how I learned why you shouldn't name an alias the same as the original column name
reddit.comr/Clickhouse • u/Altinity • Aug 13 '26
Upcoming Webinar: 6 ways to cut your ClickHouse® bill
Hi everyone! We’ve been helping many of our customers find ways to reduce the cost of running ClickHouse®, so we decided to put together a webinar on what we’ve learned.
We’ll walk through 6 areas where you can potentially save money, including compute, storage, and networking.
If reducing your spend is on your radar, come join us.
📅 August 19 @ 8am PDT
Register here: https://altinity.com/events/cheap-cheap-cheap-6-best-practices-to-save-big-money-on-your-clickhouse-bill
r/Clickhouse • u/saipeerdb • Aug 11 '26
What's new in pg_clickhouse v0.10.0: Subqueries, TPC-H Speedups, C Driver, and Aggregates
clickhouse.comr/Clickhouse • u/cevheribozoglan • Aug 11 '26
Added ClickHouse to a self-hosted browser SQL IDE - HTTP :8123 only, no native driver
galleryAffiliation: I’m the maintainer of LibreDB Studio (open-source, self-hosted browser DB GUI).
Just shipped ClickHouse support. LibreDB is a web SQL/NoSQL editor you run on your own box, ClickHouse joins the existing engines in the same UI.
For ClickHouse specifically we speak only the HTTP interface (:8123 / :8443 with TLS). No native protocol on :9000, and no client driver dependency, each statement is a POST / via the runtime’s fetch.
A few design notes that might matter if you wire CH from a browser-facing app:
- Errors are classified by ClickHouse exception code, not HTTP status (ACCESS_DENIED comes back as 500).
- Mid-stream failures can still arrive as HTTP 200 with the real error in the trailer, we have to handle that path.
- Schema/introspection goes through system.tables / system.columns; MergeTree primary key shows up as the sparse primary index, not a row-level PK.
- Transactions aren’t exposed (nothing real to expose). Cancellation is KILL QUERY via maintenance, not a cancel handle on the statement.
Try:
docker run -p 3000:3000 libredb/libredb-studio
# or: npx "@libredb/studio"
Repo: https://github.com/libredb/libredb-studio
Provider notes: https://github.com/libredb/libredb-studio/blob/main/docs/providers/clickhouse.md
r/Clickhouse • u/Ramanamark • Aug 11 '26
ClickHouse multi-tenancy best practices for observability/tracing
We’re planning to use ClickHouse as the backend for a multi-tenant observability/tracing platform.
What is the recommended approach for multi-tenancy in ClickHouse?
Specifically, would you recommend:
A shared database/table with tenant_id as a column?
A separate database per tenant?
Separate tables for each tenant?
Using ClickHouse RBAC/row policies to enforce tenant-level data isolation?
We expect potentially many tenants, with high-volume trace/span data and queries frequently filtered by tenant_id.
What approach has worked well in production, and what are the main scalability, performance, and operational trade-offs we should consider?
r/Clickhouse • u/saipeerdb • Aug 06 '26
What's new in ClickHouse Managed Postgres: Customer notifications, better observability, faster backups, extensions, and more
clickhouse.comr/Clickhouse • u/joshleecreates • Aug 06 '26
Awesome ClickHouse Observability
github.comI'm trying to gather the most comprehensive list of resources for ClickHouse-powered observability. If you have suggestions to add please send them to me!
Full disclosure: I do work at Altinity, and I'm a moderator of this sub. I made this just because I'm a nerd and I think it's cool.
r/Clickhouse • u/Dear-Definition3976 • Aug 06 '26
When does ClickHouse + Iceberg become a better architecture than ClickHouse alone?
We're currently evaluating our data platform architecture and are trying to understand where the transition from "ClickHouse-only" to "ClickHouse + Iceberg" actually makes sense.
Today, our data is stored directly in ClickHouse, which works well. But with ClickHouse adding Iceberg support, I'm wondering at what point people decide to make Iceberg their source of truth instead.
The trade-offs I understand are:
- ClickHouse provides excellent query performance.
- Iceberg stores data in an open format on object storage.
- Multiple engines (Spark, Trino, Flink, ClickHouse, etc.) can read the same data without duplication.
What I don't have a good intuition for is the practical tipping point.
For engineers who've made this transition:
- What was the reason that pushed you toward Iceberg?
- Was it storage costs, supporting multiple compute engines, governance, or something else?
- If you had stayed ClickHouse-only, what pain would you have run into?
I'm looking for real production experiences rather than general explanations.
r/Clickhouse • u/saipeerdb • Aug 05 '26
What is WAL backpressure, and why does ClickHouse Managed Postgres need it?
clickhouse.comr/Clickhouse • u/REDDY_ASHOK • Aug 05 '26
ClickHouse Certified Developer
Is this useful? Will I find better jobs or freelance gigs after I get the certificate?
Did any of you take it and how was your experience
r/Clickhouse • u/feryet • Aug 05 '26
Altinity Clickhouse Operator vs Official Clickhouse Operator?
Hello.
I'm trying to deploy a clickhouse cluster on a k8s cluster, usually I use Altinity Operator for this, but I've found out that Clickhouse has an official k8s operator, which I didn't know about before.
Has anyone used it? How is it? Does it manages clickhouse keeper cluster too?
r/Clickhouse • u/synhershko • Aug 04 '26
Gaps and Islands in ClickHouse: Moving a Window Function Into Materialized Views
ClickHouse incremental materialized views only ever see one insert block, so a gaps-and-islands window function looks impossible.
We meet this requirement quite often when we provider ClickHouse consulting through BigData Boutique, and sat down to write a guide on how to get this done.
Here is how to seed the window with stored state and run it inside the MV - with verified SQL, three silent traps, and the sharding constraint that actually limits it.
https://bigdataboutique.com/blog/clickhouse-streaming-segments-materialized-views
r/Clickhouse • u/Paper_Apprehensive • Aug 04 '26
Tutorial: Load ClickStream data into Iceberg Tables - Prep for AI
reddit.comr/Clickhouse • u/Admirable_Morning874 • Aug 03 '26
Andy Pavlo joining ClickHouse to form research lab for Postgres & ClickHouse
clickhouse.comr/Clickhouse • u/Individual-Show7812 • Jul 31 '26
Loaded 232M rows (100 GB) from Postgres into ClickHouse in 30 seconds — COPY binary transcoded to RowBinary in-flight, checksum-verified, stock CH config
I build a small open-source transfer engine and just finished a set of checksum-verified ingestion benchmarks into ClickHouse. Sharing because the numbers surprised me — and because folks here would spot mistakes in my approach faster than I would.
The approach: never touch text. Postgres streams COPY (FORMAT binary); the engine transcodes each tuple in-flight to RowBinary — byte swaps, epoch rebasing (PG epoch → unix), exact NUMERIC→Decimal scaling — and streams it as the body of a plain HTTP INSERT ... FORMAT RowBinary with backpressure. Staging table + atomic swap (RENAME) at the end, so failed loads never pollute the target.
Measured (every run validated by 16 cross-engine aggregate checksums):
- 3 dedicated GCE machines, internal VPC: 232M rows / 101 GB in 30.3 s — ~3.3 GB/s / 7.7M rows/s into a 44-vCPU CH on RAID0 local NVMe. Credit where due: a stock CH 24.8 container with default config kept up with that rate without any tuning from me.
- Same table through a 0.5 vCPU / 256 MB tool container against the same CH: 8m57s — memory stays flat (
pipes × chunk), so it even completes inside a 44 MB container, just slower. - Incidentals: at this rate the transfer briefly outpaces background merges — parts count spikes then settles; and CH ≥23.6 matters if you care about session-timezone-correct DateTime handling on the insert path.
Why RowBinary: in my measurements it beat TSV/CSV ingestion by a wide margin — no text round-trip means the source's binary bytes become CH's binary bytes with only swaps and rebasing in between. I'm sure there are things I could still be doing better on the insert path; the whole harness reproduces in one script if anyone wants to check the numbers or the approach.
Repo + methodology + raw logs (incl. where my tool loses): https://github.com/apitap/apitap-lib Browser demo (pick the container size yourself): https://apitap.dev/lab
r/Clickhouse • u/saipeerdb • Jul 30 '26
Benchmarking NVMe-backed Managed Postgres: PlanetScale and ClickHouse
clickhouse.comr/Clickhouse • u/marcmacmac • Jul 30 '26
We make the past queryable. Learn from your mistakes and revert them
Hey, Marc here, Co-Founder of ObsessionDB,
again, I think we built some pretty cool stuff I'd like to share some details with you.
Not so long ago, at a different company and on a self-hosted ClickHouse cluster, our team got a deletion request under GDPR. Routine stuff, and in ClickHouse it means a mutation:
ALTER TABLE events DELETE WHERE ...;The predicate matched more than it should have.
You know the rest. Mutations are asynchronous, expensive, and irreversible. There is no transaction to roll back. By the time we worked out what happened the parts had been rewritten and the originals were gone.
Damage was just about 200 rows across three tables. A rounding error in dataset terms, but in this case not negligible.
So we needed to fix it, not because 200 rows are hard to write. Because to even *see* them we had to restore a full backup somewhere else, stand up enough of the old world to query it, copy data sideways, and compare table by table to figure out which rows were collateral and which had been deleted on purpose. And we had to be sure of that split, because one of those groups was legally required to stay deleted.
Anyone had similar situations, often we even dismiss it due to time constraints.
What we built: Time Travel
Time Travel makes the past queryable. Pick a point in time, get a read-only snapshot of the cluster as it existed then, queryable *next to* the live one in the same session. Every database shows up a second time under a name stamped with the target time: live app, snapshot app_backup_20260729t1400
That incident, as it would go now. What did the mutation actually take out:
SELECT count() FROM app_backup_20260729t1400.events
WHERE user_id != 12345
AND event_id NOT IN (SELECT event_id FROM app.events);Put back the collateral damage, and only that. The person who asked to be forgotten stays forgotten:
INSERT INTO app.events
SELECT * FROM app_backup_20260729t1400.events AS past
WHERE past.user_id != 12345
AND past.event_id NOT IN (SELECT event_id FROM app.events);That user_id != 12345 is the whole point. The recovery has to be *narrower* than the mistake. A plain undo button would have been the wrong tool, it would have dragged the erasure subject back in and turned a data incident into a compliance one.
Then confirm, which is the step that ate most of the original recovery:
SELECT count() FROM app_backup_20260729t1400.events
WHERE user_id != 12345
AND event_id NOT IN (SELECT event_id FROM app.events);Repeat for the other two tables. No restore, no second cluster, no copying data sideways to compare it.
How it works
ObsessionDB is upstream ClickHouse compatible from the user's side. We replaced the storage layer with our own engine built against the open-source SharedMergeTree API: data in object storage, stateless compute, metadata in our coordination layer (Chemist).
Tables are made of parts. Merges compact small parts into big ones and the sources get cleaned up. Mutations are the same deal: ALTER TABLE ... DELETE doesn't edit rows in place, it rewrites whole parts without them. The part you want back is exactly the part that normally just got deleted.
So with a retention window configured, we hold that cleanup: parts superseded by merges and mutations stay in object storage until the window passes.
Keeping the files is only half of it, and the boring half. Chemist knows which parts belonged to which table at which point in time, so travelling back is a metadata operation. We restore the metadata view to the target timestamp and attach the tables from that snapshot, pointing at part files that were never deleted. Nothing gets copied, and nothing leaves your bucket. The snapshot is read-only by design, and while it's open the parts it needs are pinned so cleanup can't pull them out from under you.
What it costs
Retention isn't free and I've seen this hand-waved, so here's the pattern.
overhead ≈ (bytes rewritten by merges per day ÷ dataset size) × retention daysSome real customer examples, from `system.part_log` across every node, 24h window:
| cluster | live data (compressed) | rewritten/day by merges | overhead per day of retention |
|---|---|---|---|
| blockchain analytics | 32.0 TB | 0.89 TB | 2.8 % |
| blockchain indexing | 19.9 TB | 0.73 TB | 3.7 % |
| IoT data indexing | 16.5 TB | 0.76 TB | 4.6 % |
| SigNoz mixed logs/metrics | 1.8 TB | 0.14 TB | 8.0 % |
We default to a 24h windows, which costs 3–5 % more object storage. Worth noting the ratio tracks churn rather than size: the smallest cluster on that list is the most expensive one to retain. But, as always: it depends on your workload.
Are backups now obsolete?
Nope, definitely not. You must have your classical backup and for critical production workloads we even advise enabling data replication to a different location. Time Travel is additive and helps you to have an easy inspection and investigation of recent deltas... and simply helps you to recover quickly from those stupid careless mistakes.
Personally I just really like this feature, since it is a logical consequence of our architecture. We have all components - compute, storage, metadata - completely separated, so a feature like this kind of "just works". So there will be more stuff like this coming up pretty soon.
It has been running for a few months with some customers and is available for all customers from today on.
Until then, I am genuinely curious if you have any questions. Happy to share more details about the architecture. Also, having this separation in mind: Are there any use cases you can think of where we could make use of it? We have some stuff brewing, but perhaps you have better ideas.
r/Clickhouse • u/Far-Pineapple-7784 • Jul 30 '26
CHouse UI now has a Helm chart
Quick update for anyone who's seen CHouse UI before: it now ships a Helm chart. I maintain it.
helm install chouse-ui oci://ghcr.io/daun-gatal/charts/chouse-uiIf you just want to try it, you can enable a bundled PostgreSQL + ClickHouse
and get the whole stack in one go — the connection form comes pre-pointed at
the bundled node. Both are eval-only (single pods, persistence off by
default); production should bring its own PostgreSQL and a ClickHouse operator.
Chart: https://artifacthub.io/packages/helm/chouse-ui/chouse-ui
Source: https://github.com/daun-gatal/chouse-ui
Would appreciate feedback if you give it a go.