I had a quick question regarding the optimum structure for multi tenancy.
A similar question was asked some time ago:
If the schema in a measurement is identical (same tags, field key names) is it better to have all the data in a single measurement (per schema) with tags to idenfity the customers:
some_measurement,customer=A,deviceid=abc some_field=1 1676585506 some_measurement,customer=A,deviceid=def some_field=2 1676585507 some_measurement,customer=B,deviceid=xyz some_field=3 1676585508
or have separate measurement like this:
customerA_some_measurement,deviceid=abc some_field=1 1676585506 customerA_some_measurement,deviceid=def some_field=2 1676585507 customerB_some_measurement,deviceid=xyz some_field=3 1676585508
A deviceid will only ever be associated with one customer.
Say those measurements have 100’s millions of rows, 1000’s of deviceid and 20 customerid (assume I’m on iox here!) and I want to quickly find data for deviceid=abc. Is there any difference in efficiency querying measurement “customerA_some_measurement” for tag “deviceid=abc” than querying “some_measurement” for tag “deviceid=abc” and tag “customer=A”?