pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter J. Holzer <hjp-pgsql@hjp.at>
To: pgsql-general@lists.postgresql.org
Subject: Re: Please help to improve SELECT JOIN performance, EXPLAIN ANALYZE attached
Date: Sat, 20 Feb 2021 14:56:41 +0100
Message-ID: <20210220135641.GB30604@hjp.at> (raw)
In-Reply-To: <CAHOFxGotQte0Cjsxm-ZqS8a_yVHqCq+CFB2RXAPD3n8qNgXoEA@mail.gmail.com>
References: <CAADeyWihs2wwUmyUJmEav20sXUanp8P9BpJMQVUApoBQV-HMgg@mail.gmail.com>
	<CAHOFxGrPSnwrw3yq9XM0k=g84r1bgNc2xyYVxW+NX9FCnSVTTA@mail.gmail.com>
	<CAADeyWijZ-P4Gcz30+5+E6tuB17Py6aLAtCPaPypWugaf8Tdyw@mail.gmail.com>
	<CAHOFxGotQte0Cjsxm-ZqS8a_yVHqCq+CFB2RXAPD3n8qNgXoEA@mail.gmail.com>

On 2021-02-20 06:43:28 -0700, Michael Lewis wrote:
> Using auto_explain may be needed to catch the plan when it is slow, if the
> other suggestions don't resolve things for you.

Yes, auto_explain is very helpful. Unfortunately, by default it only
does an explain, not the equivalent of an explain analyze. So you know
what the plan was and what the total time was, but you still don't know
where it spent that time.

You can set auto_explain.log_analyze = on, but the documentation warns
that "this can have an extremely negative impact on performance". Does
anybody have experience with trying this in a real-world workload? (I
was never brave enough)

        hp

-- 
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (11+ messages)  latest in thread

Message-ID: <20210220135641.GB30604@hjp.at>
Permalink:  ../20210220135641.GB30604@hjp.at/
Also on:    postgresql.org/message-id/20210220135641.GB30604@hjp.at

 · 

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: hjp-pgsql@hjp.at
  Subject: Re: Please help to improve SELECT JOIN performance, EXPLAIN ANALYZE attached
  In-Reply-To: <20210220135641.GB30604@hjp.at>
  References: <CAADeyWihs2wwUmyUJmEav20sXUanp8P9BpJMQVUApoBQV-HMgg@mail.gmail.com> <CAHOFxGrPSnwrw3yq9XM0k=g84r1bgNc2xyYVxW+NX9FCnSVTTA@mail.gmail.com> <CAADeyWijZ-P4Gcz30+5+E6tuB17Py6aLAtCPaPypWugaf8Tdyw@mail.gmail.com> <CAHOFxGotQte0Cjsxm-ZqS8a_yVHqCq+CFB2RXAPD3n8qNgXoEA@mail.gmail.com> <20210220135641.GB30604@hjp.at>

* 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