Time bucketing query performance

Поиск
Список
Период
Сортировка
От Julian Wilson
Тема Time bucketing query performance
Дата
Msg-id CAPP28tKsOwnJKDS7i+W5hdO26_F+tm5fGxeDQ9rzuCf9YF=38A@mail.gmail.com
обсуждение исходный текст
Ответы Re: Time bucketing query performance  (Justin Pryzby <pryzby@telsasoft.com>)
Список pgsql-performance
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


В списке pgsql-performance по дате отправления:

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: help in analysis of execution plans
Следующее
От: Justin Pryzby
Дата:
Сообщение: Re: Time bucketing query performance