I am pulling two exact queries to calculate revenue on two separate websites. The query is rather simple:
select sum(action_value) as revenue from member_actions where action_value != '0' and created_at between {{moment(dateRange1.startValue)}} and {{moment(dateRange1.endValue).endOf('day')}}
Just weeks ago I was able to run both these queries in similar times 4.0 - 9.0 seconds, but now one of the queries had failed to load revenue for days.
I tried using a different component such as the 'date' component rather than the 'daterange' to see if that was the issue with no changes. As a quick fix, I even tried to create a bunch of smaller queries of 4, 6, and 12 hour increments and summed them in a transformer hoping the smaller queries would run before timing out. Then a new issue has started where the query does not even timeout at 120 seconds now and keeps going even though it was set to timeout at 120.
Other users on these dashboards noticed another bug where the date range was displaying ghost data and grabbing data from days not specified by the date range. I later came across this issue myself and found it already explained in another post; Table data gets confused when date range updated - #6 by scottborecki
Any advice on how I could possibly attempt to get this query to run more efficiently would be welcome. Since there has been multiple issues with the dateRange component, I am using this has a way to narrow down if the cause is from Retool or my own internal system.
`