I am running following wavefront query to get `SINGLE VALUE` which is Average over the given time range for which the query is being called. This works fine in the dashboard but it times out when called through the REST API. Can this query be optimized:
mavg(1vw, avg(ts(telegraf.response.times.99.percentile , accountid="123" and env="prod" and myvar!="true”)))
I tried with following but does not help
mavg(1vw, avg(align(900s, mean, ts(telegraf.response.times.99.percentile , accountid=“123” and env=“prod” and myvar!=“true”))))
Interesting - I'd expect the API call to return faster than the UI (because there's no need to render anything). What parameters are you using for the API call?