r/Clickhouse • • 1d ago

Building a Serverless ClickHouse: splitting compute and storage with plain_rewritable

16 Upvotes

https://jordivillar.com/blog/building-a-serverless-clickhouse

A few weeks ago I shared ClickHamlet here, a serverless ClickHouse you can connect to with plain clickhouse client. A lot of the questions were about how it works, so I wrote it up.

Every table lives on S3 on plain_rewritable disks. The servers are stock clickhouse-server pods that start on the first query and stop when idle, with a small C++ router linked against ClickHouse's own code in front.

Some things that might be interesting here:

- single writer per service without a lease: Kubernetes only allows one pod with a given name
- readers attach the same tables with refresh_parts_interval
- router throughput went from 451 to 2713 queries/s, mostly by taking work off the Python controller
- backends run on spot, writers included, since they hold no data

The big gaps are still multiple writers (plain_rewritable has no coordination between servers) and schema changes. Happy to answer questions or hear where this breaks.


r/Clickhouse • • 3d ago

Huang: The Game

0 Upvotes

r/Clickhouse • • 6d ago

The observability UI as we know it is dead. So what comes next?

Thumbnail
clickhouse.com
11 Upvotes

r/Clickhouse • • 7d ago

Reconciliation in clickhouse

4 Upvotes

Folks using RMT tables with denorm columns in clickhouse which are a view of oltp tables. How are you reconciling your data


r/Clickhouse • • 7d ago

Xata is joining ClickHouse

Thumbnail
xata.io
17 Upvotes

r/Clickhouse • • 7d ago

We loaded 60M rows of F1 telemetry into ClickHouse to replay races at sub-second resolution

Thumbnail
metabase.com
12 Upvotes

ClickHouse invited us (Metabase) to present at their AI Builders meetups, so our Product Advocates went wild building demos with the new product, data apps.

They made three: a 3D asteroid tracker that pulls NASA data straight in with url(), an F1 race replay on 60M rows of sub-second telemetry, and a pumpkin ERP that moves data from a production database into ClickHouse.

And they wrote about everything.


r/Clickhouse • • 10d ago

How do you handle the lack of transactions?

8 Upvotes

For my use case I update the data in my database every 5 minutes in a big batch (~10K records). I need to ensure the data in the database is complete.

Right now I create a copy of the table, insert records, swap tables and delete temporary table.

I was wondering how others solve this challenge.


r/Clickhouse • • 10d ago

What I learned from a month with WalShadow on ClickHouse Managed Postgres

Thumbnail
clickhouse.com
12 Upvotes

r/Clickhouse • • 11d ago

We have exciting news! Altinity has been acquired by EnterpriseDB.

Thumbnail
altinity.com
19 Upvotes

r/Clickhouse • • 12d ago

Fencing a Postgres primary that might still be alive

Thumbnail
clickhouse.com
12 Upvotes

r/Clickhouse • • 13d ago

Does your application need local data or faster Postgres?

Thumbnail
clickhouse.com
8 Upvotes

r/Clickhouse • • 15d ago

ch_insp - a TUI for exploring ClickHouse materialized view

25 Upvotes

I built ch_insp, a terminal UI for exploring ClickHouse materialized views and the flows between source and target tables.

I originally made it for myself, then decided to polish it and release it as open source. It includes search, filters, metrics, SQL inspection, and an offline mode for SQL schema files.

https://github.com/renatko/ch_insp

I’d love to hear your feedback!


r/Clickhouse • • 16d ago

Set up Stripe Data Pipeline for ClickHouse

Thumbnail
bookofrevenue.com
4 Upvotes

r/Clickhouse • • 17d ago

Substreams just built the Postgres/ClickHouse sink into the CLI (and a benchmark shows Uniswap V4 indexing in under 8 minutes)

Thumbnail
reddit.com
4 Upvotes

r/Clickhouse • • 18d ago

Instant redirect from "llm.clickhouse.com" to "play.clickhouse.com"

2 Upvotes

Why does that instant redirect happen? Did ClickHouse drop the LLM?


r/Clickhouse • • 20d ago

TraceHouse - ClickHouse Monitoring with Grafana Integration

20 Upvotes

Hi,

An update following the previous post about TraceHouse - an open-source tool to visually explore and monitor ClickHouse.

TraceHouse can now be installed directly in Grafana from the Administration > Plugins page, as it's officially available in the Grafana Plugins Catalog.

More on the Grafana Integration.

A new Events Timeline has been added to help correlate events (OOMs, server restarts) with cluster behaviour.

Project Overview, Documentation and live demo is available here.


r/Clickhouse • • 23d ago

Secure per-request row-level access for free-form ClickHouse queries from an MCP server?

6 Upvotes

I have a Go MCP server that lets an LLM run free-form, read-only SQL against ClickHouse. Our tables contain multiple companies, identified by a division column. An upstream gateway authenticates employees and sends the divisions they’re allowed to access. I want users to retain free-form SQL without creating a ClickHouse user per employee.

I tried a row policy using a custom query setting:

CREATE ROW POLICY mcp_division ON final.items
FOR SELECT
USING division = toUInt32(getSetting('SQL_division'))
AS RESTRICTIVE TO mcp_reader;

The Go driver sets SQL_division per query through clickhouse.WithSettings, using one connection pool. I tested this on ClickHouse 25.8:

  • Concurrent queries for different divisions stayed isolated.

  • Without the setting, the query failed.

  • But SQL containing SETTINGS SQL_division='456' overrode the value supplied by Go.

  • readonly=1 blocked both the SQL override and the legitimate Go setting. Allowing the setting to change in read-only mode allowed both.

Question: Is there a ClickHouse-native way for a trusted application to supply per-request row-policy context that the submitted SQL cannot override, while retaining one database user/pool and free-form SELECT queries? Or is the practical choice to parse and prohibit SQL-level setting changes, or use separate restricted database identities/pools per division?

I’m particularly interested in approaches where ClickHouse itself enforces the boundary, rather than relying on it in Go.

I've read https://clickhouse.com/blog/fountain-agentic-ai-for-high-volume-hiring but I cannot find more info about the problem I'm describing above. I've also checked here personal blog.

-- Remco


r/Clickhouse • • 24d ago

Amount of patches to 26.8

13 Upvotes

Hi,

When upgrading to next lts i always wait weeks or months till critical bugs will be fixed. Looking at 26.8 and i am concerned about what is going on there. Almost everyday there is a patch release. Even on weekends. 26.8 was released at the end of august and we have already more than 30 patch releases. Is this release that buggy? Or they gave full control with merges to ai agents?


r/Clickhouse • • 27d ago

I built a serverless ClickHouse you connect to with one command, feedback welcome

14 Upvotes

I've run ClickHouse in production for years and wanted a way to get a service without sign-ups or setup. You connect with:

clickhouse client --host cloud.clickhamlet.com --secure --user <name> --password

A new name creates a new service, no sign-up needed. It scales to zero when idle, and the writer and readers share storage on S3. It's an early preview: one user per service, MergeTree only. I'd love feedback on what breaks or what's missing.

clickhamlet.com


r/Clickhouse • • 28d ago

Need advice on Multi-tenancy options: Tables per tenant vs Shared Table vs Database per tenant

10 Upvotes

We need to have strict data isolation between tenants, need advise on which approach to use?

Data for tenants might need their own encryption in future, considering this and complexities with database per tenant management, should we go with Tables per tenant approach.

Max tenants in near future can expect around 1000. How feasible will be the Tables per tenant?
Have read more than 5000 tables per cluster are frowned upon?

Please suggest.


r/Clickhouse • • 28d ago

Postgres wait events, now in Query Insights

Thumbnail
clickhouse.com
9 Upvotes

r/Clickhouse • • 28d ago

Pcodec is awesome! 15% smaller and 2x faster than ClickHouse's DoubleDelta

Thumbnail
tomalard.github.io
14 Upvotes

r/Clickhouse • • Oct 17 '26

I Tried to Find How ClickHouse Implements String Hash Tables

10 Upvotes

Hi everyone,

I'm learning and exploring topics around database systems. This is a continuation from my last post here: https://www.reddit.com/r/Clickhouse/comments/1x0hu4s/i_tried_to_find_how_clickhouse_keeper_takes/

I think in one of the lectures in CMU's Database Systems course, Prof. Andy had mentioned that ClickHouse has different implementations of hash tables for different datatypes. I wanted to see what these are. So I tried to explore how String Hash Tables are implemented in ClickHouse.

I recorded a concept and code walkthrough here: https://youtu.be/wFCXI9P6Trg

A short summary of the points in the video:

  1. Why String keys can hamper performance of hash tables

  2. How ClickHouse uses String Adaptive Hash Tables to improve performance

  3. The code walk through the files: StringHashTable.h

Do give it a watch and consider supporting by liking the video or subscribing :)

This is partly for my own future reference and partly to share with others who might be interested in it. Would love feedback and corrections from people who know this stuff deeply.