The continuous queries are replaced with tasks which in all examples shows the use of Flux. However I find the downsampling is slower compared to V1 (Continuous queries). So the question is Can a task support V1 continuous queries? Are there any examples on how to accomplish this?
Hi @sbains,
To answer your question up front sadly not. We can help you optimize your flux query though. Can you let us know what 2.X version of InfluxDB you are using and also the flux query you are trying to run?
Thanks for the reach. It is a straight forward summarization 1min data to 5min data (sum).
from(bucket: “xyz”)
|> range(start: -30m)
|> filter(fn: (r) => (r._measurement == “bytes”))
|> timeShift(duration: -1s)
|> aggregateWindow(every: 5m, fn: sum)
|> to(bucket: “acer”, org: “Zzz”)
@sbains If you run timeShift()
after aggregateWindow()
, you’ll likely see a noticeable change in performance. Just curious, why the -1s time shift?
I don’t see any performance difference based on the queries executed using grafana for a 7 day duration. The timeshift before and after has impact on the data. It is being used as a offset in the query…
What version of InfluxDB are you using?
Version: InfluxDB 2.1.1
Hi @sbains,
Could you try and run against 2.4. We have been working hard on Flux optimisations since 2.1.1.
I updated couple of systems and see an improvement but it is not drastic. It shaves off 60ms for a query that takes 830ms…