Hi,
I'm trying to debug improve the performance of my time bucketing query. What I'm trying to do is essentially bucket by an arbitrary interval and then do some aggregations within that interval (min,max,sum, etc). I am using a `max` in the query I posted. For context in the data, it is 1 minute candles of cryptocurrency data (open price, high price, low price, close price, volume, for an interval). I want to transform this to a 10 minute interval, on demand, and that is what this query is meant to do.
I understand the slow part of my query is in the LEFT JOIN, but I just can't quite figure out how to do it without the LEFT JOIN.
Here is my pastebin with all the details so I don't clutter the message. I tried to follow everything in the 'Slow Query Questions' WIKI page. There is also a depesz link there.
Thank for your help,
Julian