Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lDSkz-0007hs-Bv for pgsql-general@arkaria.postgresql.org; Sat, 20 Feb 2021 13:57:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lDSkx-0002dC-8G for pgsql-general@arkaria.postgresql.org; Sat, 20 Feb 2021 13:57:11 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lDSkw-0002d5-SU for pgsql-general@lists.postgresql.org; Sat, 20 Feb 2021 13:57:10 +0000 Received: from mail.hjp.at ([212.17.106.138] helo=rorschach.hjp.at) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lDSkY-000504-Um for pgsql-general@lists.postgresql.org; Sat, 20 Feb 2021 13:57:09 +0000 Received: by rorschach.hjp.at (Postfix, from userid 1000) id ED5234507; Sat, 20 Feb 2021 14:56:41 +0100 (CET) Date: Sat, 20 Feb 2021 14:56:41 +0100 From: "Peter J. Holzer" To: pgsql-general@lists.postgresql.org Subject: Re: Please help to improve SELECT JOIN performance, EXPLAIN ANALYZE attached Message-ID: <20210220135641.GB30604@hjp.at> Mail-Followup-To: pgsql-general@lists.postgresql.org References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="R3G7APHDIzY6R/pk" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --R3G7APHDIzY6R/pk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 =3D 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 --=20 _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | hjp@hjp.at | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" --R3G7APHDIzY6R/pk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAmAxFRUACgkQ8g5IURL+ KF1R/w/+Os76Qek1s1IqzAbv3JROwqRWXtLJnrPJS8BEgJFjs9L6NfxPVaccPYJc p8MuXNwOguJafLEfbmZEzeQo38TnsNo6ga1Qp8V3UagrmpD3pB4wPkipVrbQm92P gTLlxYM3CMkp/E2ocR1bNmBicwilDXDqVGjJntlF4tdObvaDDOaWiSiOkwFojGx7 MJoNNERs8UcqBGYxFPNKDQ/x5WPND88036UnmoyxnE+85AgX1QAywcgycAVrvTg6 6x4prbfaYsgvXreswPr0pIVMDixZbdhc6XKGnXifFKK3rM4QRx2sVapB8lvBUGyE D6ILgMlgBLg9zNK3pALztO5e5AQeew7Lkci0dIpw3ygo/F1Ax5gVClXNoeBZN1Lj AWRnHPfB5JNfN/H4Z2t0eWY+TDnl8q/leVTd/odiVZDM3FgmPZ5tKKpguXsnJiT1 VA2J+EabT2UoPi84WavzLpo2MtBUeisO3SpSU7kI53adXPawMp/l4ucQUSZQ2HEc IE0h2XIwGdvUFqEJAO++hm1D39ODMt5R5BgQ7MHNY815cIE4dHibpAyLyYNUk/5s HUAnVF58xKyYDqkJsVRKjnteleR81Vf6ips8AMCobJti096kQK3IoWqHD4Ab8JlR 1D6dJNVPcw7sL/hBZBHoJbbj4K+78n/MJVDBcE96rehOn0MrefQ= =2RRI -----END PGP SIGNATURE----- --R3G7APHDIzY6R/pk--