pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: avinash varma <avinashvarma443@gmail.com>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: Planning time is high in Postgres 11.5 Compared with Postgres 10.11
Date: Mon, 16 Dec 2019 10:10:07 -0500
Message-ID: <24176.1576509007@sss.pgh.pa.us> (raw)
In-Reply-To: <CADaHE9F1UKPwPeNvrkw_a-a7mkse_U3nVxRwwRfLekzaLj1ESw@mail.gmail.com>
References: <CADaHE9H6kW7h2nseztsuti56_t4bEhtV=u=nXY=gnYsiLU1-oA@mail.gmail.com>
	<ac25d46b-07a0-1e54-0386-2cfed6941119@iki.fi>
	<CADaHE9F1UKPwPeNvrkw_a-a7mkse_U3nVxRwwRfLekzaLj1ESw@mail.gmail.com>

avinash varma <avinashvarma443@gmail.com> writes:
> Perf Report Output:
> Samples: 41K of event 'cpu-clock:uhH', Event count (approx.): 10461000000
>   Children      Self  Command   Shared Object          Symbol
> *+   49.97%    49.97%  postgres  postgres               [.]
> FunctionCall2Coll+   17.58%    17.58%  postgres  postgres               [.]
> int8eq+   15.15%    15.15%  postgres  postgres               [.] eqjoinsel+
>   12.82%    12.82%  postgres  postgres               [.]
> eqjoinsel_semi.isra.17*
> +    1.82%     1.82%  postgres  postgres               [.] pglz_decompress
> +    0.96%     0.00%  postgres  [unknown]              [.] 0000000000000000
> +    0.62%     0.00%  postgres  [unknown]              [.]
> 0x0000000000000010
>      0.56%     0.56%  postgres  postgres               [.] deconstruct_array
>      0.20%     0.00%  postgres  [unknown]              [.]
> 0x0000000001674bd0

Hm.  eqjoinsel didn't change at all between v10 and v11.  Are you
*sure* those installations have the same configurations?  A plausible
theory is that one has got a much larger default_statistics_target
than the other (or at least, did when these tables were last analyzed),
and in consequence these tables have large most-common-values
statistics arrays, but not in the v10 installation.

[ thinks for a bit ]  It seems possible that you could end up here
even if the user-level settings are indeed the same, as a result of

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

which changed the method for deciding which values are MCVs.  Maybe
these tables have some corner-case distribution that causes the new
method to think there are many more MCVs than the old one thought.

First thing to do is to look into pg_stats and see how large those
arrays actually are in each case ...

			regards, tom lane





view thread (13+ messages)  latest in thread

Message-ID: <24176.1576509007@sss.pgh.pa.us>
Permalink:  ../24176.1576509007@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/24176.1576509007@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-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, avinashvarma443@gmail.com, hlinnaka@iki.fi
  Subject: Re: Planning time is high in Postgres 11.5 Compared with Postgres 10.11
  In-Reply-To: <24176.1576509007@sss.pgh.pa.us>
  References: <CADaHE9H6kW7h2nseztsuti56_t4bEhtV=u=nXY=gnYsiLU1-oA@mail.gmail.com> <ac25d46b-07a0-1e54-0386-2cfed6941119@iki.fi> <CADaHE9F1UKPwPeNvrkw_a-a7mkse_U3nVxRwwRfLekzaLj1ESw@mail.gmail.com> <24176.1576509007@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