Slow query with aggregate and many LEFT JOINS

Поиск
Список
Период
Сортировка
От kimaidou
Тема Slow query with aggregate and many LEFT JOINS
Дата
Msg-id CAMKXKO7NSKdRqoUA582kwK2nprf4NLQ4r+ZXS9vhBh5gPwwLQg@mail.gmail.com
обсуждение исходный текст
Ответы RE: Slow query with aggregate and many LEFT JOINS  (Igor Neyman <ineyman@perceptron.com>)
Список pgsql-performance
Hi all,

I need to optimize the following query
http://paste.debian.net/hidden/ef08f864/
I use it to create  a materialized view, but I think there is room for optimization.
I tried to
SET join_collapse_limit TO 15;
with to real difference.

Explain shows that the GROUP AGGREGATE and needed sort kill the performance.
Do you have any hint how to optimize this ?
https://explain.depesz.com/s/6nf

Regards
Michaël

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

Предыдущее
От: kimaidou
Дата:
Сообщение: Aggregate and many LEFT JOIN
Следующее
От: Justin Pryzby
Дата:
Сообщение: Re: Aggregate and many LEFT JOIN