Schema for varying field-keys

Hey everybody,

I am trying to come up with a good schema. The surrounding is the following:
I have several data sources, each data source will be represented by the tag-keys. The fields for all data sources are the same and the number of the fields are roughly 200, however the fields per ingest may vary - a potential data ingest could look like the following:

Ingest1:
myMeasurement,source=1 val1=10,val2=5
Ingest2:
myMeasurement,source=1 val1=5
Ingest3:
myMeasurement, source=2 val1=50,val3=0

The database write rate can go up to e.g. 100Hz, as the sources do not really have the possibility to buffer the data locally

I encountered some data throughput issues with this kind of schema. I tried to use a different schema, which seems to be better in terms of writing speed:
Ingest1:
myMeasurement, source=1 name=“val1”,data=10
myMeasreument, source=1 name=“val2”,data=5
etc.pp.

However the biggest drawback of this kind of schema is then on the query-side, as it is quite cumbersome to work with this schema. The first schema is more intuitive to work with.

Are there some general hints or recommendation to increase the writing performance of the first schema?

In general, I have found your first schema, with distinct field names versus tag differentiation of a single field to be faster, particularly if you are write more than one field per point. As well, it permits differing types between fields and much more natural query syntax. Are you able to batch your writes so that you write more than one point per call? Batching writes somewhere between 5000 and 10,000 provides much greater efficiency.