---
title: "How we made ClickStack 5x faster for ClickHouse observability"
description: "ClickStack's OpenTelemetry logs schema, inherited from the ClickHouse exporter for the OTel Collector, was reworked through a benchmark-driven process."
url: "https://swe.quest/articles/how-we-made-clickstack-5x-faster-for-clickhouse-observability-ed934241e77977aa"
canonical: "https://clickhouse.com/blog/making-clickstack-5x-faster-clickhouse-observability"
source: "ClickHouse"
published: "2026-07-02"
difficulty: "hard"
kind: "Case study"
reading_minutes: 22
tags: ["observability","analytics","performance","query-engines","storage-engines"]
---

# How we made ClickStack 5x faster for ClickHouse observability

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2026-07-02, 22 min read, Case study. Original: [https://clickhouse.com/blog/making-clickstack-5x-faster-clickhouse-observability](https://clickhouse.com/blog/making-clickstack-5x-faster-clickhouse-observability)

## Summary

ClickStack's OpenTelemetry logs schema, inherited from the ClickHouse exporter for the OTel Collector, was reworked through a benchmark-driven process. The changes combined time-bucketed primary key redesign, text indexes, query rewrites, materialized views and newer ClickHouse features, cutting representative observability query latency by more than 5×. Every schema iteration was validated with the ClickCannon tool and ephemeral ClickHouse Cloud instances at 640 MiB/s ingest on three 24-core replicas. Each change was judged against ingestion throughput, CPU, memory, part counts and the full query workload, so a gain on one query pattern could not hide regressions elsewhere.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [Observability](https://swe.quest/tags/observability.md) (Reliability & operations)
- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Query engines](https://swe.quest/tags/query-engines.md) (Data & databases)
- [Storage engines](https://swe.quest/tags/storage-engines.md) (Data & databases)

## Prerequisites

- ClickHouse MergeTree tables ([easy posts on Analytics & OLAP](https://swe.quest/tags/analytics.md?difficulty=easy))
- sparse primary indexes
- data-skipping indexes
- OpenTelemetry logs ([easy posts on Observability](https://swe.quest/tags/observability.md?difficulty=easy))

## Keywords

ClickStack, ClickHouse, ClickCannon, OpenTelemetry, MergeTree, bloom filter, text index, ClickHouse Cloud

## Related posts

- [How ClickStack makes ClickHouse faster for observability](https://swe.quest/articles/how-clickstack-makes-clickhouse-faster-for-observability-323b8d19e17244d4.md): ClickHouse · 2026-03-18 · Medium · 21 min read · Observability, Query engines, Analytics & OLAP, Performance engineering, SQL
  ClickStack speeds up ClickHouse for observability by generating and rewriting queries to fit how the engine stores, prunes and processes data, instead of passing raw SQL through.
- [What's new in ClickStack - April 2026](https://swe.quest/articles/what-s-new-in-clickstack-april-2026-8ecf13fb74019726.md): ClickHouse · 2026-05-19 · Medium · 13 min read · Observability, Analytics & OLAP, SQL, Performance engineering
  ClickStack's April 2026 release adds alerts driven by arbitrary ClickHouse SQL, so rolling baselines and standard-deviation anomaly checks can be written with window functions and fire when the query returns 1.
- [So, is ClickHouse winning the observability wars?](https://swe.quest/articles/so-is-clickhouse-winning-the-observability-wars-3577c2c26e782dd2.md): ClickHouse · 2026-08-27 · Medium · 20 min read · Observability, Analytics & OLAP, Storage engines, Search, Performance engineering
  ClickHouse has become a common storage and query layer for observability, and the main reason is its columnar architecture.
- [Why OpenAI chose ClickHouse for petabyte-scale observability](https://swe.quest/articles/why-openai-chose-clickhouse-for-petabyte-scale-observability-dd57167d0fc8c4cb.md): ClickHouse · 2025-06-30 · Medium · 6 min read · Observability, Performance engineering, Analytics & OLAP, Scaling, Data structures
  OpenAI ingests petabytes of logs daily, growing over 20% monthly, into a ClickHouse cluster of 90 shards with two replicas each, fed by Fluent Bit agents.
- [ClickHouse and OpenTelemetry](https://swe.quest/articles/clickhouse-and-opentelemetry-84cdeb7807e844a6.md): ClickHouse · 2024-11-07 · Medium · 10 min read · Observability, Analytics & OLAP, Databases, Open source
  ClickHouse now officially supports the OpenTelemetry Collector exporter for ClickHouse, which has reached beta for logs and traces.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
