Time series databases (TSDBs) are specialized data stores optimized for timestamped data — sensor readings, server metrics, financial ticks, application logs — where every record is indexed by time and queries typically involve time ranges and aggregations. InfluxDB is a leading TSDB built on Apache Arrow and Parquet (v3.0), offering high ingestion throughput, columnar storage, and multiple query languages (SQL, InfluxQL, Flux). Unlike general-purpose databases, TSDBs prioritize write performance over update/delete operations, manage data lifecycle through automatic downsampling and retention policies, and handle high-cardinality tags with specialized indexing. Understanding the data model (measurements, tags, fields, timestamps) is key — tags are indexed metadata for filtering, fields hold measured values, and proper schema design directly impacts cardinality and query performance.
What This Cheat Sheet Covers
This topic spans 15 focused tables and 142 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
Table 1: InfluxDB Line Protocol Elements
| Element | Example | Description |
|---|---|---|
temperature,location=us-west | Table name in the data model; groups related metrics; required first element in line protocol; comma-separated from tagset with no space. | |
location=us-west,sensor=A | Indexed metadata for filtering and grouping; comma-separated key-value pairs; always stored as strings; create series (unique combinations); directly impact cardinality. | |
temp=72.5,humidity=45i | Measured values (floats, integers, strings, booleans); space-separated from tagset; at least one field required; not indexed; use suffixes i (integer), u (unsigned). | |
| 1672531200000000000 | Unix nanosecond precision by default; optional (server time if omitted); space-separated from fields; InfluxDB stores and returns all timestamps in UTC. | |
weather,city=LA temp=85.3 1672531200000000000 | Format: measurement[,tag=val]* field=val[,field=val]* [timestamp]Each line represents one data point; newline-separated; whitespace between tagset/fieldset/timestamp is significant. |