pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mladen Marinović <mladen.marinovic@kset.org>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Slow planing...
Date: Fri, 06 Dec 2019 09:45:24 -0500
Message-ID: <4902.1575643524@sss.pgh.pa.us> (raw)
In-Reply-To: <CAHjkqPSdki=eaNHZxiOOOd9iuHYnPdwbVa7_T2dGWO-6r3h+UA@mail.gmail.com>
References: <CAHjkqPTBJ1Gf=x90OKYR=fAn9_+9FpHksg0Y98T7gUXF1igzWA@mail.gmail.com>
	<CAHjkqPSdki=eaNHZxiOOOd9iuHYnPdwbVa7_T2dGWO-6r3h+UA@mail.gmail.com>

=?UTF-8?Q?Mladen_Marinovi=C4=87?= <mladen.marinovic@kset.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





view thread (5+ messages)  latest in thread

Message-ID: <4902.1575643524@sss.pgh.pa.us>
Permalink:  ../4902.1575643524@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4902.1575643524@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, mladen.marinovic@kset.org
  Subject: Re: Slow planing...
  In-Reply-To: <4902.1575643524@sss.pgh.pa.us>
  References: <CAHjkqPTBJ1Gf=x90OKYR=fAn9_+9FpHksg0Y98T7gUXF1igzWA@mail.gmail.com> <CAHjkqPSdki=eaNHZxiOOOd9iuHYnPdwbVa7_T2dGWO-6r3h+UA@mail.gmail.com> <4902.1575643524@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox