Am I missing something obvious when translating the influxQL query below to Flux? From Grafana the influxQL query executes in 191ms, the Flux one takes about 38s??
This is for the same time range, last 2 weeks with one record every 30s (so somewhere around 2.5M records)
SELECT max(chargeur_velo) as chargeur_velo, max(plaque) as plaque, max(cuisine) as cuisine, max(lave_vaisselle) as lave_vaisselle, max(livebox) as livebox FROM ${db}.."power" WHERE $timeFilter GROUP BY time($watts_interval) fill(linear)
Hi @grant1, I will look into your suggestion, but I think I found the main culprit: using the "contains"function in the second filter seems to prevent the push down.
If I simply use a static “or” expression performance is an order of magnitude better.
Yes, it is the contains(). It is known to be impacting a lot the perfromance. If you are using grafana, you can bypassing it using carefully some variables and some regex. Read the full discussion here