We are new to InfluxDB, and are struggling to understand the query performance difference between a "tag" and a "field" for storing simple, time-stamped measurement values (literally, time series data). I have to imagine this is one of the most common applications for Influx, yet still I'm not clear what is the smartest method.
We have previously logged data to MySQL and similar databases, using a structure that had columns of name/timestamp/value/unit. Each measurement became one row in that table. Obviously, this has some performance drawbacks, so we are looking for a better way.
A new InfluxDB will be installed on a project. We have some number of sensors on the project, each of which has a unique identifier (i.e. "TT-001" might be Temperature Sensor #1) and produces a single measured value (i.e. 104.6 degF) with a timestamp. These measurements are taken at regular intervals (i.e. every second). There are perhaps 500 individual measurements, all of which will be stored for periods of perhaps 10 years.
Summarizing the question: described as above, will logging data to InfluxDB as follows will result in the fastest-loading queries?
- Measurement = "Project_Name"
- Field Key => Measurement Name (i.e. "TT-001")
- Field Value => Measured Value (i.e. 104.6)
The queries are almost exclusively "select (tags) from [start date to end date]". Literally, 99% of these queries will be graphs of data over time using Grafana.
For this application, where does the "tag" fit in, or is it not useful?
Before anybody asks: I have read the documentation, and continued looking into examples, forums, blogs, etc. I have yet to find a concise, clear answer as to the highest-performant method for storing measurements as described above, where I do not believe that "metadata" is particularly useful for our application.
Really appreciate some input on this...the StackExchange community has always been able to help when I hit these kinds of road blocks!