Empty tags - affecting cardinality?


We recently stopped writing a certain tag which had incrementing values in order to decrease series cardinality.

I can see that the tag key still appears in the measurement. Will it ever get purged? Maybe when all historical data points that still contains these tag values? Or will it remain there forever as an empty tag? If so, does it affect cardinality in any way?

Currently cardinality still grows even when this problematic tag is not inserted anymore.


Hi @atad,
Welcome to the community! Do you have a retention policy set on your bucket?. As long as you are no longer writing to that tag it should be removed on the next data deletion from your bucket. Your cardinality will only increase based on the number of different measurement → tags combinations that they have. For example:

let's say you have Site (S1, S2, S3) Location (L1, L2, L3)
Cardnality would be  9 ( 1(measurement) * 3 (site) * 3 (location)) .

This is also a great page to checkout: Resolve high series cardinality | InfluxDB Cloud Documentation

thanks @Jay_Clifford

We have multiple retention policies for continuous queries and one 90 day default RP. Only have “database”/“measurements” not “buckets”.

So when influx tries to delete a shard group that expired, will it completely drop the tag key from the tags index? consider there are 0 values for that tag in the shard.