Best Practice for amount of series in one measurement

Currently, I am overthinking my InfluxDB schema and I was wondering whats the best practice for the amount of series in one measurement. Currently my schema looks like this:

tag: sensorId
fields: value, valid

In my current schema I have up to ~35.000 different sensorIds in one measurement. I am using InfluxDB 1.8. May it will be end up with a amount of up to 1.000.000 different series per measurement.

I would like to switch to a schema like:
tag: valid
fields: sensorId1, sensorId2, …, sensorId100000

But I cant find any advice on the maximum amount of fields per measurement. Can you help me?

Thanks in advance,

Hello @kazomoto,
What version if InfluxDB are you using?

Hey @Anaisdg,
currently I am migrating from InfluxDB 1.8 with in-mem engine to InfluxDB 2.0. So my goal is to use InfluxDB 2.0 as my future database.

Hello @kazomoto,
The schema recommendations vary depending on your HW. I would also think about the common queries that you plan on executing as tags and measurements are indexed but fields aren’t. Also your query ingest rate has a large effect as well.

@kazomoto -

For 1.8, your numbers are not unreasonable. We’d expected you to be ok with 1M series per measurement. If you are using the in-memory index, you may run into limitations depending on your data size and memory available. With TSI files for the index, we would expect series cardinality in the 100M to be possible. All contingent on the specifics of your hardware as @Anaisdg pointed out.

Have you run into a specific problem with queries or performance?


Hi Phil, thank you for answering my question. I switched to influx V2 and I was able to solve my problem with pivoting. For now, I am still using my old schema and it works pretty well. Thank you!

1 Like