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 1mnjSs-0002yY-3P for pgsql-general@arkaria.postgresql.org; Thu, 18 Nov 2021 15:36:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mnjSq-0006oh-Ta for pgsql-general@arkaria.postgresql.org; Thu, 18 Nov 2021 15:36:40 +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 1mnjSq-0006oS-I3 for pgsql-general@lists.postgresql.org; Thu, 18 Nov 2021 15:36:40 +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 1mnjSo-0004iU-Dz for pgsql-general@lists.postgresql.org; Thu, 18 Nov 2021 15:36:40 +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 1AIFaVjA2915806; Thu, 18 Nov 2021 10:36:31 -0500 From: Tom Lane To: DAVID ROTH cc: Thomas Kellerer , pgsql-general@lists.postgresql.org Subject: Re: General Performance Question In-reply-to: <966668681.565028.1637246920878@connect.xfinity.com> References: <1653563957.563818.1637244913291@connect.xfinity.com> <966668681.565028.1637246920878@connect.xfinity.com> Comments: In-reply-to DAVID ROTH message dated "Thu, 18 Nov 2021 09:48:40 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2915804.1637249791.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 18 Nov 2021 10:36:31 -0500 Message-ID: <2915805.1637249791@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk DAVID ROTH writes: > The code I am migrating uses the EXECUTE immediate form for almost every= thing. The path of least resistance for me is to just copy the code to Po= stgres and change "EXECUTE IMMEDIATE" to "EXECUTE". > I am asking about performance differences to see if it is worth converti= ng code that does not have any dynamic elements. Yes, absolutely. (I would've imagined that that habit is pretty awful for performance on Oracle, too.) Having said that, the golden rule in such things is to get it to work first, and make it fast later. I wouldn't worry about cleaning up unnecessary EXECUTE usage till you have a working port. regards, tom lane