Re: Aggregate and many LEFT JOIN

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Lewis <mlewis(at)entrata(dot)com>
Cc: kimaidou <kimaidou(at)gmail(dot)com>, 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 18:05:59
Message-ID: 17803.1550858759@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Michael Lewis <mlewis(at)entrata(dot)com> writes:
> Does the plan change significantly with this-
> set session work_mem='250MB';
> set session geqo_threshold = 20;
> set session join_collapse_limit = 20;

Yeah ... by my count there are 16 tables in this query, so raising
join_collapse_limit to 15 is not enough to ensure that the planner
considers all join orders. Whether use of GEQO is a big problem
is harder to say, but it might be.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Igor Neyman 2019-02-22 19:47:45 RE: Slow query with aggregate and many LEFT JOINS
Previous Message Michael Lewis 2019-02-22 17:18:02 Re: Aggregate and many LEFT JOIN