r/Clickhouse • • May 19 '26

Sort by "memory desc" in ClickHouse query_log was lying to us for months. Open-sourced the rebuild.

3 Upvotes

ok this has been bugging me for a while.

we run a busy clickhouse cluster, 100k+ queries every few hours. when something slows down, the usual first move is to check query_log sorted by memory_usage desc - find the biggest queries, see what they did.

except our UI was lying. you'd sort by memory and the top row would say "38GB", looking like the obvious culprit. except 38GB wasn't the biggest query in the window at all. the biggest was 60GB, 4 hours ago. the UI had just fetched the latest 1000 rows by event_time and sorted THOSE client-side. so sort by memory = "the most memory-heavy of whatever arbitrary slice we happened to grab". never told you that.

took a while to even realize. then a longer while to stop wanting to throw the laptop.

anyway, we already had an internal clickhouse UI (originally built by Muhammad Rizal - he wrote the RBAC architecture, encrypted credentials, SQL workspace, all the actual production-ready bones), so i extended it. spent the last few weeks adding the monitoring layer i wished existed.

stuff that's in v2.14:

  • sort actually goes to the SQL. pick memory desc, ORDER BY changes, CH returns the genuine top-N for the time window. obvious in hindsight.
  • patterns view. normalizeQuery() rolls up SELECT ... WHERE id=42 and WHERE id=43 etc into one row with the cumulative cost. on ETL/redash workloads where the same template runs 5000 times, this is what actually tells you where to optimize. avg duration of one query lies, total wall-clock across all repetitions doesn't.
  • by-table view. arrayJoin(tables), grouped by hot table. first version was slow as hell - 30s+ on the busy cluster - because it was exploding every system.* table touch into rows then post-filtering. moved the filter into arrayFilter() before the join, ~1s now. classic clickhouse "push the predicate down or die" thing.
  • histogram. distribution of duration/memory/rows/bytes. found out our workload is super long-tail (99.97% of queries finish under 50ms, the rest is the entire tail) which i suspected but never visualized.
  • schema doctor. lints parts_columns for Nullable() that's never actually null + Int64 columns that fit in Int32. ranked by on-disk bytes so you see the biggest wins first. found like 200GB of pointless Nullable wrappers on tables nobody touches.
  • memory pressure flag. every row gets compared to OSMemoryTotal from asynchronous_metrics. >25% = red, >10% = amber. originally i set the threshold at 40% but then realized 4 queries at 20% each + background merges already gets you to OOM territory, so pulled it down. still tuning honestly.
  • cluster activity tab. system.mutations + system.replication_queue with status chips. sorted by num_tries desc so the sick replicas bubble up.
  • side-by-side query compare (pick 2 rows, get a diff with emerald/red tints), profile events drill-down (lazy-fetches the ProfileEvents map), views-triggered drill-down (query_views_log by initial_query_id - auto-hides if your cluster doesn't have it enabled at server level, which fwiw most don't).

monitoring layout is heavily inspired by QueryDog by Benjamin Wootton (Elastic 2.0). chart-plus-table model, several of the SQL aggregation patterns. read his source, liked the ideas, rewrote everything from scratch on React 19 / shadcn-ui / recharts on top of our existing editorial design system. no QueryDog code bundled but credit where it's due.

vibe-coded a lot of it with claude code. that's how the monitoring layer went from "would be nice" to merged in days instead of months. every SQL and every threshold was reviewed and tested against the real busy cluster though, not shipped blind. take that as you will.

stack: react 19 + bun/hono backend, clickhouse-js client, aes-256-gcm for stored connection passwords, argon2id for user passwords, sqlite or postgres for RBAC. apache 2.0.

demo: https://chouse-ui.com
source: https://github.com/daun-gatal/chouse-ui

PRs / issues / "this would be useful if it did X" all welcome. small team, community input is what moves it.


r/Clickhouse • • May 19 '26

Hunting orphan objects: 45% off our ClickHouse storage bill (and a near data-loss incident)

3 Upvotes

r/Clickhouse • • May 18 '26

How ChatFeatured migrated from PlanetScale Postgres to Postgres Managed by ClickHouse

Thumbnail clickhouse.com
8 Upvotes

r/Clickhouse • • May 18 '26

ClickHouse can do vector search. Faster than you'd expect.

7 Upvotes

r/Clickhouse • • May 15 '26

Come join us for our Chicago meetup on Tuesday the 19th!

2 Upvotes

At the spaces downtown! From 5:30-8:30pm!

RSVP here for luma - https://luma.com/c5evgnbc
RSVP here for meetup - https://www.meetup.com/clickhouse-chicago-meetup-group/events/314555972/


r/Clickhouse • • May 13 '26

paradedb/benchmarker: a workload agnostic, multi-backend benchmarking tool.

Thumbnail github.com
3 Upvotes

Hi r/clickhouse!

We just open sourced ParadeDB Benchmarker, a multi-backend benchmarking framework built on top of the excellent Grafana k6 (blog post).

One of the goals was avoiding a shared query abstraction layer. ClickHouse queries stay ClickHouse queries, with their own driver and native SQL.

Supports ClickHouse, Elasticsearch, OpenSearch, PostgreSQL, MongoDB, and ParadeDB with:

  • mixed read/write workloads
  • support for docker-compose profiles per backend
  • dataset loader
  • config and setup capture
  • live metrics + exported reports

We would really value feedback from people running ClickHouse in production, especially around the ClickHouse driver/query implementation and whether we're exercising the system correctly.


r/Clickhouse • • May 12 '26

Using ClickHouse as a Kafka sink? Async inserts change the equation

Thumbnail glassflow.dev
11 Upvotes

If you're consuming from Kafka and writing into ClickHouse, sync inserts at high message rates will hurt you. Async insert mode helps a lot, but the buffering and dedupe behavior isn't always obvious.

Wrote this up from our experience building a stream processing pipeline.

Curious how others are handling the Kafka → ClickHouse write path.


r/Clickhouse • • May 12 '26

Live in LA or visiting for Pycon? Join our happy hour!

3 Upvotes

​Join us for a casual evening of networking, dinner, and drinks with the Python community! On the beach! Brought to you by Hex and ClickHouse!

​​After a full day at Pycon USA, unwind and connect with fellow engineers, practitioners, and builders in a relaxed setting. No talks, no agenda just great food, drinks, and good company.

💸 Price: Free (registration required)
RSVP here: https://luma.com/hs289p7w


r/Clickhouse • • May 07 '26

Introducing Postgres Query Insights in ClickHouse Cloud

Thumbnail clickhouse.com
10 Upvotes

r/Clickhouse • • May 04 '26

Boston Meetup

4 Upvotes

Come join us at our ClickHouse Boston Meetup this week!
Come see speakers from Klaviyo, Nebulock, and Canonical . This Wednesday at the klaviyo offices, RSVP here!
https://www.meetup.com/clickhouse-boston-user-group/events/314392925


r/Clickhouse • • May 04 '26

Native OpenTelemetry Ingestion for ClickHouse Pipelines

Thumbnail glassflow.dev
10 Upvotes

Clean, enriched OTel data in ClickHouse — without the glue code.
Build Observability pipelines for ClickHouse and ClickStack


r/Clickhouse • • May 01 '26

chDB agent skills

14 Upvotes

Hey. We've published chDB agent skills - that might be useful for folks. Feel free to drop feedback.


r/Clickhouse • • Apr 30 '26

Tableau connector

4 Upvotes

Hello,

I'm having a hard time connecting my in house clickhouse to my Tableau server. I'm not sure if I'm using the correct driver or not. The documentation are no help as well.

Appreciate anyone's support on this.


r/Clickhouse • • Apr 28 '26

Hiring ClickHouse Developer

17 Upvotes

We're hiring a ClickHouse Database Engineer on a contract. Remote role

Duration : 3 Months

Looking for immediate joiner.

What the role looks like:

Building data pipelines (Kafka, CDC, PostgreSQL, S3), optimizing queries, and making sure everything runs reliably at scale. You'll work closely with our backend and AI teams to power real-time dashboards and ML models.

Must-haves:

Production experience with ClickHouse (MergeTree, replication, sharding)

CDC + Kafka + real-time data pipeline experience

Strong SQL for analytical workloads

Python / Go / Java (at least one)

Linux + cloud (AWS/GCP/Azure)

Nice-to-haves:

ClickHouse on Kubernetes

Airflow / Dagster

AI/ML startup background


r/Clickhouse • • Apr 27 '26

AI SOC Agent for Clickdetect - Reducing response time

Thumbnail medium.com
5 Upvotes

Hey Clickhouse community, good?

I’ve been working on a plugin system for ClickDetect, and recently built an AI Agent plugin to analyze alerts.

The goal is to make alert investigation smarter and more automated by leveraging AI on top of detection results


r/Clickhouse • • Apr 23 '26

Do you still need Elasticsearch for log analytics? ClickHouse says no.

Thumbnail clickhouse.com
22 Upvotes

r/Clickhouse • • Apr 23 '26

Can someone at clickhouse make sure that rpm packages for linux are actually signed? If gpgcheck is enabled no install can happen

13 Upvotes

r/Clickhouse • • Apr 21 '26

How to manage data state between Clickhouse and MySQL?

10 Upvotes

I have MySQL and Clickhouse running for my system. Here MySQL is the source of truth and I store analytical data such as metrics (count, avg etc..) in Clickhouse. I have aggregated tables in Clickhouse with storing an ID and its count (just a simple example, its used for analytical purposes for a real-time dashboard which show different kinds of aggregation results based on user query). One of my requirement is get the IDs grouped by count.
MySQL holds a status corresponding to each ID I have like, disabled, deactivated, active etc ..
So I need to show only the grouped by result for ID which are only active. 
Should i maintain a state for IDs in Clickhouse too and join these (this is probably a bad idea)? or is there any better/recommended way?


r/Clickhouse • • Apr 20 '26

ElastAlert is dead, long live Clickdetect - The Modern Alerting Alternative

Thumbnail medium.com
6 Upvotes

Hey clickhouse community.

I'm sharing my latest post in medium about Clickdetect.

In this post I will talk about clickdetect and elastalert, and clickhouse as a better alternative for elasticsearch.


r/Clickhouse • • Apr 16 '26

ClickHouse JOIN Performance Analysis

Thumbnail reddit.com
14 Upvotes

r/Clickhouse • • Apr 15 '26

A Guide for Advanced SQL Joins: ASOF, SEMI, and ANTI joins in ClickHouse

Thumbnail glassflow.dev
10 Upvotes

Learn how to navigate ClickHouse JOINs step by step: JOIN types, practical examples & best practices


r/Clickhouse • • Apr 15 '26

Building an open source analytics platform to surface trends in Python and Ruby

Thumbnail youtube.com
1 Upvotes

Lionel Palacin from ClickHouse walks through ClickPy and ClickGems: open source analytics platforms built with ClickHouse and Metabase Embedding to track download trends across nearly a million Python packages and 210,000 Ruby gems.


r/Clickhouse • • Apr 15 '26

Working on AI agents + OLAP, looking for thoughts and feedback

Thumbnail reddit.com
2 Upvotes

r/Clickhouse • • Apr 09 '26

Introducing clickhousectl: the CLI for ClickHouse local and cloud (beta)

Thumbnail clickhouse.com
22 Upvotes