Re: Aggregate and many LEFT JOIN

Поиск
Список
Период
Сортировка
От Michael Lewis
Тема Re: Aggregate and many LEFT JOIN
Дата
Msg-id CAHOFxGpb-MdAMWmmHJs48tV+DAxUi57P2XKoLnsqEaVSDXJcFA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Aggregate and many LEFT JOIN  (kimaidou <kimaidou@gmail.com>)
Ответы Re: Aggregate and many LEFT JOIN  (kimaidou <kimaidou@gmail.com>)
Список pgsql-performance


On Mon, Feb 25, 2019 at 2:44 AM kimaidou <kimaidou@gmail.com> wrote:
I have better results with this version. Basically, I run a first query only made for aggregation, and then do a JOIN to get other needed data.


Not really "fast", but I gained 30%
 

It still seems that disk sort and everything after that is where the query plan dies. It seems odd that it went to disk if work_mem was already 250MB. Can you allocate more as a test? As an alternative, if this is a frequently needed data, can you aggregate this data and keep a summarized copy updated periodically?

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

Предыдущее
От: Corey Huinker
Дата:
Сообщение: Re: Massive parallel queue table causes index deterioration, butREINDEX fails with deadlocks.
Следующее
От: "support@mekong.be"
Дата:
Сообщение: Re: Query slow for new participants