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 1silYs-0096qF-Aw for pgsql-general@arkaria.postgresql.org; Tue, 27 Aug 2024 02:03:58 +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 1silYp-000MvP-LQ for pgsql-general@arkaria.postgresql.org; Tue, 27 Aug 2024 02:03:56 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1silYp-000MvH-Ac for pgsql-general@lists.postgresql.org; Tue, 27 Aug 2024 02:03:55 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1silYn-001c3m-CA for pgsql-general@lists.postgresql.org; Tue, 27 Aug 2024 02:03:54 +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 47R23lrv2965761; Mon, 26 Aug 2024 22:03:47 -0400 From: Tom Lane To: David Rowley cc: nikhil raj , "pgsql-generallists.postgresql.org" , NIKITA PATEL , Patel Khushbu Subject: Re: Significant Execution Time Difference Between PG13.14 and PG16.4 for Query on information_schema Tables. In-reply-to: References: <2962669.1724722813@sss.pgh.pa.us> Comments: In-reply-to David Rowley message dated "Tue, 27 Aug 2024 13:50:56 +1200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2965759.1724724227.1@sss.pgh.pa.us> Date: Mon, 26 Aug 2024 22:03:47 -0400 Message-ID: <2965760.1724724227@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk David Rowley writes: > On Tue, 27 Aug 2024 at 13:40, Tom Lane wrote: >> Yeah, it looks like that condition on "table_name" is not getting >> pushed down to the scan level anymore. I'm not sure why not, >> but will look closer tomorrow. > So looks like it was the "Make Vars be outer-join-aware." commit that > changed this. Yeah, I got that same result by bisecting. It seems like it's somehow related to the cast to information_schema.sql_identifier: we are able to get rid of that normally but seem to fail to do so in this query. There was a smaller increase in the runtime at dfb75e478 "Add primary keys and unique constraints to system catalogs", but that seems to just be due to there being more rows in the relevant catalogs. (That's from testing the query in an empty database; probably the effect of dfb75e478 would be swamped in a production DB anyway.) regards, tom lane