
Unlock this content
Enter your email to unlock this content for free
Data Types Rules
TL;DR
Five rules for data type selection: use strict types, prefer minimal precision, avoid Nullables if possible, use LowCardinality for categorical data, and evaluate advanced types carefully.
Five Rules for Data Type Selection
1. Use Strict Types
Unstructured types mean slowness. ClickHouse performs best with well-defined, structured data types.
✓ Prefer explicit types (UInt32, DateTime, LowCardinality(String)), structured schemas, type-specific optimizations.
✗ Avoid generic String for numbers/dates, JSON for frequently queried fields, unstructured types when structured alternatives exist.