Thanks to visit codestin.com
Credit goes to postgrespro.com

Aggregate and many LEFT JOIN - Mailing list pgsql-performance

From kimaidou
Subject Aggregate and many LEFT JOIN
Date
Msg-id CAMKXKO6Ltz14uVgAyxy-cGSZoOQCbU5__2mjgVPv90snONZjNw@mail.gmail.com
Whole thread Raw
Responses Re: Aggregate and many LEFT JOIN
List pgsql-performance
Hi all,

I need to optimize the following query
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 ?

Regards
Michaël

pgsql-performance by date:

Previous
From: Gunther Schadow
Date:
Subject: Re: neither CPU nor IO bound, but throttled performance
Next
From: kimaidou
Date:
Subject: Slow query with aggregate and many LEFT JOINS