I’m looking to optimize my Flux queries and was wondering if is more efficient to create multiple parallel connections/queries or create on big query?
For some context here is the schemas I’m using:
| _measurement | tag key | field key | field key |
| AnalogChannels | channelName | quality (string) | value (double) |
| TimeChannels | channelName | elasped (long) | t0 (string) |
My application has 1000+ channels (a mix of AnalogChannels and TimeChannels). I periodically need to get the value for each channel. I’m not concerned about getting the data at once.
Is it better to initiate a query for each individual channels (simple query) or initiate a single query that would return all the channels? Querying multiple channels at once will need a more complex query as I would need to group some of the data together (for instance, for each AnalogChannel, the value and quality need to be grouped in a single table, with _time match)
I played with the profiler for the different queries I’m doing but it doesn’t really give me the picture for best practice.
Thank you for your help