Best practices for situations with many tag values

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.

Hi @waitingmyself

If you have not already looked at InfluxDB 3 (currently only a Cloud product), then you might want to (and consider waiting until the on-prem version comes out later this year, AFAIK). Acc. to this, “InfluxDB 3.0’s database engine is designed to handle high cardinality datasets” which I believe accurately describes your situation where you will have a large amount of tag values.

1 Like

This is really helpful. Unlimited cardinality is exactly what I need. Looking forward to 3.0.
Thank you for your reply.