Design your data model
Overview of the data model section covering table layouts, partition columns, keys, and schema optimization
This section covers the decisions you make when designing schemas for time-series data on PostgreSQL with TimescaleDB.
- Wide, narrow, and medium tables: Choose a table layout based on how many data points you track and how often the schema changes.
- Primary keys, time columns, and uniqueness: Pick a partition column, define keys that include it, and understand how constraints work with hypertables.
- Schema optimization: Indexes, constraints, triggers, tablespaces, JSON, and foreign data wrappers.