Re: Aggregate and many LEFT JOIN - Mailing list pgsql-performance

From Michael Lewis
Subject Re: Aggregate and many LEFT JOIN
Date
Msg-id CAHOFxGpHYTTVAdJW1Fi9K3N4P12nF384WyrvwbhgZBYpCMmC2g@mail.gmail.com
Whole thread Raw
In response to Re: Aggregate and many LEFT JOIN  (kimaidou <kimaidou@gmail.com>)
Responses Re: Aggregate and many LEFT JOIN  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-performance
Does the plan change significantly with this-

set session work_mem='250MB';
set session geqo_threshold = 20;
set session join_collapse_limit = 20;

With that expensive sort spilling to disk and then aggregating after that, it would seem like the work_mem being significantly increased is going to make the critical difference. Unless it could fetch the data sorted via an index, but that doesn't seem likely.

I would suggest increase default_statistics_target, but you have good estimates already for the most part. Hopefully someone else will chime in with more.

Michael Lewis

pgsql-performance by date:

Previous
From: kimaidou
Date:
Subject: Re: Aggregate and many LEFT JOIN
Next
From: Tom Lane
Date:
Subject: Re: Aggregate and many LEFT JOIN