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 1kYRua-0003qe-8B for pgsql-general@arkaria.postgresql.org; Fri, 30 Oct 2020 10:45:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kYRuY-0005o6-HV for pgsql-general@arkaria.postgresql.org; Fri, 30 Oct 2020 10:45:34 +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 1kYRuY-0005nz-9t for pgsql-general@lists.postgresql.org; Fri, 30 Oct 2020 10:45:34 +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 1kYRuQ-0000gT-Jd for pgsql-general@lists.postgresql.org; Fri, 30 Oct 2020 10:45:33 +0000 Received: by rorschach.hjp.at (Postfix, from userid 1000) id 9EC583C79; Fri, 30 Oct 2020 11:45:18 +0100 (CET) Date: Fri, 30 Oct 2020 11:45:18 +0100 From: "Peter J. Holzer" To: pgsql-general@lists.postgresql.org Subject: Re: Issue executing query from container Message-ID: <20201030104518.GA29818@hjp.at> References: <2961873.1594763498@sss.pgh.pa.us> <3065070.1594824162@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="4Ckj6UjgE2iN1+kY" 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 --4Ckj6UjgE2iN1+kY Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2020-10-27 17:46:59 +0100, Eudald Valc=E0rcel Lacasa wrote: > I've run the automated script several times, and the duration of the > query is widely variable. >=20 [0.005 s vs. 1500 s for the same plan] > As you can see, they don't seem to differ between each other, but the > duration is abismaly different. > I have the database logging everything, what should I look for so that > it can help me understand this strange behavior? You might want to turn auto_explain.log_analyze and auto_explain.log_buffers on. You probably should do this only on a test system, not the production system as the manual states that auto_explain.log_analyze "can have an extremely negative impact on performance". hp --=20 _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | hjp@hjp.at | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" --4Ckj6UjgE2iN1+kY Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAl+b7rkACgkQ8g5IURL+ KF2EOxAAh3jV/QHIb4h7DpYFiG6X7DCjGTca/uDWcjks3drvrL3L69EMdTfGcckn KwgN3snQ3idg3Q20taAI3lgOMovligCWIM4T0WRh5/Qc6msMiEhpb+nmXN/axIsz eWWhoe508CeHP3+Pu0k9gvqBTh6r1x2Lip/x7X13HQcqKym5hcl7yfIMBghAGW1W gqnPRPj952sDBbkU8ge+1tH/dD8rUpBRvI6tqouX9JFBZHD6vR3jQZoAmjNwS92B /WqmTnfksUVa7bKXC2XFmPrat8kPEUGfuB/iV8z8onbrZgsxAAliXbwQtt07vCvi siwk4HCEyM0ur/qy5Vy6X+8iGxWFMDakdTYW5rt0UCz0Rx8UxphUup1b+IiLI07v l4qu/Pt5vIQfadIPXmtsM9ipS23wIk9Siir68Hvrmvctb503l4frWSy8yaJGc0R6 WxIbudxL8H+Etf1HxWULnuLU5x5+qwJmT2nDVdoQvR8oGpz/OkOZKUmQPhaTyBaa mNFjk9tdMif129tdfflwP6fsdHal/S8aYtsx9QWMegQjJb3C82tQqvX09DisQOeX SfXqFvAovVQ/Py9Vc+uJri8N+c6le8H2Jr8LctJZslIgMwEpnZlNhSgJ7xMdSnqv HeXvB+925PYRrd301fsp+gs8GlrDa+n8xF0RI4QdmpYGF+7ryoI= =IccG -----END PGP SIGNATURE----- --4Ckj6UjgE2iN1+kY--