Re: Slow planing...

Tom Lane <[email protected]>
Newsgroups gmane.comp.db.postgresql.general
Message-ID <[email protected]>
=?UTF-8?Q?Mladen_Marinovi=C4=87?= <[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.