Maximum number of fields and tags

schema
influxdb
#1

What are the maximum number of fields and tags a measurement can store?

What is generally recommended - store all 5000 fields in one measurement or split?

#2

Hello @nmahesh567,
It depends entirely on your schema and hardware, but a quick rough answer is ~1 million unique series. Please take a look at the hardware requirements.

#3

@Anaisdg I’m also curious about this. Although we consider the max number of unique series (i.e. unique combination of measurement and tags), a single series might still contain a (large?) number of fields. From a performance perspective, is there a recommended cap on number of fields in a series? Correspondingly, to @nmahesh567’s question, when the number of fields goes beyond a certain threshold, is there a performance benefit to splitting into separate series?

(for reference, based https://github.com/influxdata/influxdb/issues/3458 I’m assuming there’s currently no technical limit to the number of fields)

#4

Please note that I have 5000 fields but a few tags. Is field set part of the series identification?

Also, a point will have a few fields and not all 5000 fields.

In this case, what is a recommendation? Use one measurement for all 5000 fields or split?

#5

Hello @nmahesh567 ,

Can you please tell me a little bit more about what you’re trying to do? Why do you have 5000 fields? Are you writing to all of those fields all the time?

#6

@nmahesh567 are you using 1.x or 2.x? I’m told this isn’t that much of an issue in 2.x as it is in 1.x. However, trying to use Chronograph or any UI would be a real pain with that many fields in one measurement.

#7

@svet, I’m told that there would be less performance issues in 2.x as compared to 1.x. It’s unclear what those issues are. There isn’t really a guide. I would try and use as few fields as possible/measurement that allows you to solve your problem without sacrificing cardinality. I would try and find a middle ground. It’s more of an art than a science from what I understand right now.

#8

I don’t work on InfluxDB, so take this with a grain of salt, but my understanding of the internals is that it will be essentially the same. The reason being that you have 5000 series with either layout. Each series is identified by the measurement, its tag keys and values, and the field name.

1 Like