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 1nWIZz-0006Dc-1E for pgsql-bugs@arkaria.postgresql.org; Mon, 21 Mar 2022 14:00:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nWIYz-0000eH-Db for pgsql-bugs@arkaria.postgresql.org; Mon, 21 Mar 2022 13:59:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nWIYz-0000e8-5v for pgsql-bugs@lists.postgresql.org; Mon, 21 Mar 2022 13:59:13 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nWIYw-0007K3-AJ for pgsql-bugs@lists.postgresql.org; Mon, 21 Mar 2022 13:59:12 +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 22LDx8X81872583; Mon, 21 Mar 2022 09:59:08 -0400 From: Tom Lane To: Prajna Shetty cc: "pgsql-bugs@lists.postgresql.org" , Beenu Sharma Subject: Re: Performance issue post upgrade on Version 13 - Incorrect Estimation Cost choosing Hash Aggregate-Nested Left Loop Join In-reply-to: References: Comments: In-reply-to Prajna Shetty message dated "Mon, 21 Mar 2022 11:45:05 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1872581.1647871148.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 21 Mar 2022 09:59:08 -0400 Message-ID: <1872582.1647871148@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Prajna Shetty writes: > There is change in query plan in 12.4 version and Version 13 resulting i= n performance slowness post upgrade. Standard upgrade methods don't transfer statistics from the old version, so the first question to ask is have you ANALYZE'd the relevant tables since upgrading? If you have, then to offer useful help with this we'll need to see all the details described in https://wiki.postgresql.org/wiki/Slow_Query_Questions In any case, this is unlikely to be a bug. The pgsql-performance list would be a more suitable place to discuss it. regards, tom lane