Hi, I have some problems with my schema design. I want to share my practice and hope get some advices.
- 2k+ devices
- Each device has 20~70 sensors. A sensor under a device collects a time series.
- The time series from the same device are time synchronized.
- The time series frequency is not fixed. The average period is around 10 seconds.
- Each time series has four metadata: Describe, No, Type, Unit. The four metadatas only depends on
SensorIdis determined, the four metadatas can be determined.
- Given a device, a subset of the sensors, and a time range (usually not more than two hours), return the time series of these sensors of this device during this time period. Only the timestamps and values of the time series are needed. Metadatas are not queried.
Current schema design:
InfluxDB version: 1.4.2
Use a single measurement. The tag keys and field keys in this measurement are as follows:
|tag key||tag key||tag key||tag key||field key||field key||field key|
- In my case, is it a good design to store all series in a single measurement?
- I’m not sure how to arrange
Is it a bad idea to make
Is it a good idea to make
I heard about that there are independent tags and dependent tags. Is it a good idea to make
Unittag keys dependent on
SensorId? But I can’t find tutorials on how to set dependent tags. Or, dependent tags are just a description of the situation, not a switch?
Or should I just remove
Unitout of InfluxDB, store them in a relational table elsewhere, and access them using
SensorIdas a primary key when in need?
- By the way, regarding upgrading, is there a strong recommendation to upgrade from 1.4 to a later version?