ClickHouse OLAP
Design and query ClickHouse for real-time analytics. Models MergeTree tables, writes fast aggregations and materialized views, tunes partitions and indexes, and connects from Node and Python clients.
This skill applies ClickHouse analytics patterns for event and metrics data. It models MergeTree and ReplacingMergeTree tables, designs sort keys and partitions, writes high-throughput aggregations and materialized views, tunes query performance, and wires up Node and Python clients for ingestion and reads.
When to use
Use when designing ClickHouse schemas, writing analytical aggregations or materialized views, tuning partitions and indexes, or querying ClickHouse for real-time metrics.
Examples
Model an events table
Design a MergeTree schema
Design a ClickHouse MergeTree table for product events with the right sort key and monthly partitioning for fast time-range queries
Materialized view
Pre-aggregate metrics
Create a ClickHouse materialized view that rolls up raw events into hourly active-user counts
Optimize a query
Speed up an aggregation
This ClickHouse GROUP BY scans the whole table. Rewrite it to use the sort key and add the right index