I use influxdb 2.7 to store blood sugar data. One problem I encounter is that I need to use deviceSn as a tag, but there may be more deviceSn because each device has a 14-day lifespan. Assuming that 1,000 people are wearing the device at the same time, the value of this tag will soon reach 100,000 over time. How should I deal with this problem? Are there any best practices?
The queries I use now include querying all data of a specified device on a certain day, analyzing the data of a certain device for 14 days, such as the median, 75% quantile, etc., analyzing whether the blood sugar situation of a certain device has improved after 7 days compared with the previous 7 days, etc.
In the future, there may be blood sugar value analysis of all devices at a certain moment, such as the median, the number of devices with a value exceeding 13.9, etc.
I am currently using a measurement called cgm_glucose, which has a tag called deviceSn, a field called glucose, and a field called glucoseDeviceTime that stores the time when the device generated the data.