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 1oYTIv-0003pd-9W for pgsql-general@arkaria.postgresql.org; Wed, 14 Sep 2022 14:23:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oYTIt-0007fJ-Ui for pgsql-general@arkaria.postgresql.org; Wed, 14 Sep 2022 14:23:51 +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 1oYTIt-0007fA-Kb for pgsql-general@lists.postgresql.org; Wed, 14 Sep 2022 14:23:51 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oYTIr-0007Z7-Iu for pgsql-general@postgresql.org; Wed, 14 Sep 2022 14:23:50 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 28EENmSS2675890; Wed, 14 Sep 2022 10:23:48 -0400 From: Tom Lane To: Matthias Apitz cc: Postgres General Subject: Re: Mysterious performance degradation in exceptional cases In-reply-to: <20220914083126.GA9@sh4-5.1blu.de> References: <20220914083126.GA9@sh4-5.1blu.de> Comments: In-reply-to Matthias Apitz message dated "Wed, 14 Sep 2022 10:31:26 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2675888.1663165428.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 14 Sep 2022 10:23:48 -0400 Message-ID: <2675889.1663165428@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Matthias Apitz writes: > To fulfill the search, the application server has to do some 100 > ESQL/C calls and all this should not take longer than 1-2 seconds, and > normally it does not take longer. But, in some situations it takes > longer than 180 seconds, in 10% of the cases. The other 90% are below 2 = seconds, > i.e. this is digital: Or 2 seconds, or more than 180 seconds, no values = between. I'm wondering about a plan change. Can you install auto_explain on the server and capture info about the fast and slow cases? regards, tom lane