Unlock this content

Enter your email to unlock this content for free

By continuing, you agree to our Terms of Service and Privacy Notice, and to receive occasional marketing emails.

Schema Design Principles

TL;DR

Schema design impacts storage and query performance. Five principles: use smaller data types, get sorting keys right, leverage specialized types, compress your data, and plan for schema evolution.

The Five Principles

Get these right and your queries go from seconds to milliseconds:

  1. Data Types: Smaller is faster
  2. Sorting Keys: Get this wrong and everything slows down
  3. Specialized Types: Use LowCardinality and friends
  4. Compression: Less data on disk = faster queries
  5. Schema Evolution: Plan ahead (or use tools that abstract it)
Loading diagram...

Tinybird is not affiliated with, associated with, or sponsored by ClickHouse, Inc. ClickHouse® is a registered trademark of ClickHouse, Inc.

Schema Design Principles | ClickHouse for Developers