Re: Slow planing...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mladen Marinović <mladen(dot)marinovic(at)kset(dot)org>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Slow planing...
Date: 2019-12-06 14:45:24
Message-ID: 4902.1575643524@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

=?UTF-8?Q?Mladen_Marinovi=C4=87?= <mladen(dot)marinovic(at)kset(dot)org> writes:
> After a couple of hours of trying different stuff, set enable_mergejoin =
> off made the planning time look better: Planning time: 0.322 ms
> Any ideas why this helps?

Hmm, possibly because it's reducing the number of calls to
get_actual_variable_range. Do you have an indexed column,
with a lot of recently-dead entries at the end of its range,
that is a join key in the slow query? If so, you might be
hitting the problem that was fixed (not for 9.6) here:

https://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=3ca930fc3

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2019-12-06 15:38:58 Re: Insert Table from Execute String Query
Previous Message Mladen Marinović 2019-12-06 13:50:22 Re: Slow planing...