Cloud Parts

Wide, hybrid or narrow tables?

DimensionWide tablesHybrid (medium) tablesNarrow tables
In one lineOne row per entity and moment, one column per metricA metric-name column plus one value column per data typeOne row per entity, moment and metric
Shape(time, host, cpu, mem, disk)(time, host, metric, value_float, value_int, value_text)(time, host, metric, value)
Adding a metricALTER TABLE ... ADD COLUMN, and every query and ingest job that lists columnsInsert rows with the new name; only a new data type adds a columnInsert rows with the new name
Rows for one reading of six metrics166
Value typesEach metric has its own native typeNative types, but something must map each metric to its columnOne type (often a double); otherwise a table per type, or JSONB and casts
Reading many metrics togetherOne row, no joinsFilter on metric, pivot, and CASE across typesA pivot, or a join per metric
Sparse dataNULL cells when values arrive apart; cheap in columnar storageNULLs in the unused type columnsNo NULLs: a missing value is a missing row
Compression (TigerData’s rating)Good: NULL-heavy columns compress wellGood: uniform typed columnsExcellent: uniform columns
Reach for it whenMetrics are known, stable and read togetherMetrics come and go but fall into a few types, or differ per tenantMetrics come and go and are read one series at a time
Where you see itHost and sensor tables; InfluxDB points with several fields; ArcticDB frames with very many columnsTigerData’s medium layout; fixed columns plus jsonb or a ClickHouse MapPrometheus series; OpenTelemetry metrics in ClickHouse; pandas melt() output

Rule of thumb

Start from how you read, not how data arrives. If dashboards show many metrics of one thing at one moment and the list is stable, go wide. If metrics come and go and are read one series at a time, go narrow. If they come and go but you want native types, add typed value columns. Mixing is normal: TigerData suggests a wide table for core metrics and a medium table for custom ones. Moving between layouts later means rewriting history, so when unsure, pick the one that extends without migrations.

Sources