Skip to content

Performance· Case study 06

ClickHouse performance & cost re-architecture with projections

Re-architected a high-volume ClickHouse analytics workload around tiered projections, directory-based partitions, and tuned compression, which stopped out-of-memory dashboard failures and cut storage and compute.

0

dashboard out-of-memory failures after rollout

Architecture at a glance

  1. query_log profile
  2. Tiered projections
  3. Partitions + ZSTD + TTL
  4. Fast dashboards

01 The problem

Interactive dashboards over a very large event table were failing with memory-limit errors, and storage kept growing faster than the value it delivered.

02 What I built

  1. 1Profiled query logs to find which dimension and measure combinations dashboards actually used.
  2. 2Designed tiered projections that pre-aggregate each dashboard tier, including every primitive aggregate the metrics layer needs, so queries hit small projections instead of raw data.
  3. 3Capped the projections’ storage footprint and set deduplicate-merge-projection behavior so merges stay correct.
  4. 4Moved to directory-based partitions, set TTLs on non-lookup tables, dropped unused high-cardinality columns such as session IDs, and tuned ZSTD compression levels.
  5. 5Set query memory and concurrency limits and disabled unnecessary refreshes during the backfill.

03 Impact

Dashboard memory failures stopped and queries moved onto small pre-aggregated projections. This work is part of the ~30–40% storage and CPU reduction delivered for enterprise customers.

08 · Contact

Let’s build something that holds up in production.

If something here resonates, whether it’s a data problem, an idea, or a conversation worth having, I’d love to hear from you. The fastest way to reach me is a message on LinkedIn.

Good reasons to reach out

  • Data platform help

    ClickHouse or Druid performance, Kubernetes operations, migrations, and cost reviews.

  • Collaboration

    Open-source work, writing, talks, or comparing notes on a hard data problem.

  • Just to talk shop

    Real-time analytics, AdTech data, MCP and agent tooling, or life as an FDE.

esc
↑ ↓ navigate↵ select