Last Updated: November 21, 2025
InfluxDB
Time-series database platform
Core Concepts
| Item | Description |
|---|---|
Measurement
|
Like a SQL table |
Tags
|
Indexed metadata |
Fields
|
Actual data values |
Timestamp
|
Time of data point |
Bucket
|
Named location for time series |
Flux
|
Query and scripting language |
Flux Query Examples
from(bucket: "sensors")
|> range(start: -1h)
|> filter(fn: (r) => r["_measurement"] == "temperature")
|> filter(fn: (r) => r["location"] == "room1")
|> mean()
from(bucket: "metrics")
|> range(start: -24h)
|> filter(fn: (r) => r["_measurement"] == "cpu")
|> aggregateWindow(every: 10m, fn: mean)
Common Operations
| Item | Description |
|---|---|
Write Point
|
Insert time-series data |
Query
|
Retrieve data with Flux |
Retention Policy
|
Auto-delete old data |
Continuous Query
|
Pre-compute aggregations |
Task
|
Scheduled Flux script |
Best Practices
- Use tags for dimensions, fields for metrics
- Set appropriate retention policies
- Use downsampling for old data
- Index frequently queried tags
💡 Pro Tips
Quick Reference
InfluxDB is optimized for time-series data workloads