# ClickHouse table design

> Chooses ClickHouse engines, sort keys and materialised views for huge event tables, so queries stay fast.

- Page: https://youraiskill.com/skill/ericrisco-clickhouse-analytics
- What it does: Use when running a ClickHouse server for high-volume OLAP: choosing a MergeTree engine and ORDER BY/PARTITION BY keys, ingesting billions of event/log/metric rows, pre-aggregating with materialized views, or fixing a query that scans instead of pruning. NOT in-process file analytics (that is `duckdb`), NOT OLTP CRUD indexing (that is `postgresdb`).
- Niches: data
- Licence: MIT
- Status: Checked: open licence, author credited, passed the YourAISkill safety scan. Can be added to a paid pack.
- Contents: instructions plus scripts (7 files)

To add it, see https://youraiskill.com/guides/how-to-add-a-skill-to-claude
