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.

Special Data Types

TL;DR

Arrays are generally safe. AggregateFunction types are essential for pre-aggregation. JSON, Enums, and Maps offer flexibility but can impact performance. Choose simple, structured types when possible for faster queries.

Arrays

Arrays are safe and efficient for storing lists of values. Combine with LowCardinality for categorical arrays.

CREATE TABLE events ( event_time DateTime, user_id UInt32, tags Array(LowCardinality(String)) -- Multiple tags per event ) ENGINE = MergeTree() ORDER BY (event_time, user_id);

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

Special Data Types | ClickHouse for Developers