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?
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?
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.
@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 [Feature Request] Configurable max number of fields · Issue #3458 · influxdata/influxdb · GitHub I’m assuming there’s currently no technical limit to the number of fields)
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?
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?
@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.
@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.
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.