# ClickHouse Schema Design and Data Modeling

DevFeed: [ClickHouse Schema Design and Data Modeling](<https://devfeed.tech/articles/clickhouse-schema-design-and-data-modeling-19112.md>)

Original publisher: [Read original article](<https://severalnines.com/blog/clickhouse-schema-design-and-data-modeling/>)

Author: Agus Syafaat

Published: 2026-07-17T12:48:53Z

Content type: article

Language: en

Sources: [SeveralNines](<https://devfeed.tech/sources/severalnines.md>)

Topics: [schema design](<https://devfeed.tech/topics/schema-design.md>), [clickhouse](<https://devfeed.tech/topics/clickhouse.md>), [data-modeling](<https://devfeed.tech/topics/data-modeling.md>)

Tags: [announcement](<https://devfeed.tech/tags/announcement.md>), [article](<https://devfeed.tech/tags/article.md>), [clickhouse](<https://devfeed.tech/tags/clickhouse.md>), [cluster](<https://devfeed.tech/tags/cluster.md>), [concepts](<https://devfeed.tech/tags/concepts.md>), [core](<https://devfeed.tech/tags/core.md>), [cta](<https://devfeed.tech/tags/cta.md>), [data](<https://devfeed.tech/tags/data.md>), [data-modeling](<https://devfeed.tech/tags/data-modeling.md>), [database](<https://devfeed.tech/tags/database.md>), [database-general](<https://devfeed.tech/tags/database-general.md>), [deploy](<https://devfeed.tech/tags/deploy.md>), [design](<https://devfeed.tech/tags/design.md>), [distributed](<https://devfeed.tech/tags/distributed.md>), [distribution](<https://devfeed.tech/tags/distribution.md>), [engine](<https://devfeed.tech/tags/engine.md>), [hardware](<https://devfeed.tech/tags/hardware.md>), [modeling](<https://devfeed.tech/tags/modeling.md>), [queries](<https://devfeed.tech/tags/queries.md>), [query](<https://devfeed.tech/tags/query.md>), [schema](<https://devfeed.tech/tags/schema.md>), [schema-design](<https://devfeed.tech/tags/schema-design.md>)

## AI overview

The excerpt explains ClickHouse's cluster table model: shards hold different horizontal slices of data, while replicas within a shard hold identical copies for fault tolerance. Local tables store each node's shard data; distributed tables store no data and route queries across shards, then collect and merge results. Schema changes must be applied to local tables on every node, with the distributed table definition kept in sync. The article frames schema design as an ongoing operational concern: poor decisions can contribute to slow queries, oversized partitions, and long-running mutations. The excerpt begins to discuss shard-key selection but cuts off before giving guidance.

## Source excerpt

Sometimes, we see ClickHouse queries that should normally complete in milliseconds take several seconds to finish or worse, time out entirely. When that happens, there is a good chance that the schema is the real culprit. The problem is often not the query itself, nor is it a hardware bottleneck. Instead, it can stem from [...] The post ClickHouse Schema Design and Data Modeling appeared first on Severalnines.