Re: Aggregate and many LEFT JOIN

From: Michael Lewis <mlewis(at)entrata(dot)com>
To: kimaidou <kimaidou(at)gmail(dot)com>
Cc: Justin Pryzby <pryzby(at)telsasoft(dot)com>, postgres performance list <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Aggregate and many LEFT JOIN
Date: 2019-02-22 17:18:02
Message-ID: CAHOFxGpHYTTVAdJW1Fi9K3N4P12nF384WyrvwbhgZBYpCMmC2g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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*

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2019-02-22 18:05:59 Re: Aggregate and many LEFT JOIN
Previous Message kimaidou 2019-02-22 16:33:11 Re: Aggregate and many LEFT JOIN