Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uFan9-006JlX-Lm for pgsql-bugs@arkaria.postgresql.org; Thu, 15 May 2025 15:46:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uFan7-00FNCk-V2 for pgsql-bugs@arkaria.postgresql.org; Thu, 15 May 2025 15:46:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uFan7-00FNCb-MO for pgsql-bugs@lists.postgresql.org; Thu, 15 May 2025 15:46:37 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uFan4-00238U-2N for pgsql-bugs@lists.postgresql.org; Thu, 15 May 2025 15:46:37 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 54FFkVbo1776556; Thu, 15 May 2025 11:46:32 -0400 From: Tom Lane To: Sajith Prabhakar Shetty cc: "pgsql-bugs@lists.postgresql.org" Subject: Re: Postgres: Queries are too slow after upgrading to PG17 from PG15 In-reply-to: References: Comments: In-reply-to Sajith Prabhakar Shetty message dated "Thu, 15 May 2025 05:33:28 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <11969.1747323991.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 15 May 2025 11:46:31 -0400 Message-ID: <11970.1747323991@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Sajith Prabhakar Shetty writes: > Now surprisingly one of the query i took from application which used to = execute in 2s in PG15, is now taking 1min+ in PG17. The data you've actually showed us does not back up that complaint. But I do see a 2x slowdown. > Explain plan of the two queries almost same, all the joins and paths use= d are exactly same. Yeah, that is odd. The only simple explanation I can think of is that you are using a debug build of v17. regards, tom lane