I have a dashboard where I’ve added a interval type variable to be able to set the granularity of my graphs. I use the variable by changing “GROUP BY time($__interval)” to "GROUP BY time(myvar)" in my influx db series queries. Now, this works as expected. I'm able to select whatever granularity I want and the graphs update accordingly. The issue I'm having is slow performance when I zoom out while having a fine granularity, e.g. 1m. I take it that it's due to a massive amount of data is returned by the query, much more than is needed to produce the graph. This is normally controlled by the __interval which makes sure to to select more data than can be represented by the pixels on the screen.
So, what I’d like is to add my myvar, but still have __interval as a lower limit in the GROUP BY statement.
Intuitively I tried things like GROUP BY max($__interval, $myvar), but that does not seem to be supported.
Is there any way to get the functionality I describe?