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 1mKNWj-000591-IM for pgsql-performance@arkaria.postgresql.org; Sun, 29 Aug 2021 16:19:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mKNWi-0006YG-D0 for pgsql-performance@arkaria.postgresql.org; Sun, 29 Aug 2021 16:19:20 +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 1mKNWi-0006Y7-4j for pgsql-performance@lists.postgresql.org; Sun, 29 Aug 2021 16:19:20 +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 1mKNWc-0004Bi-1u for pgsql-performance@postgresql.org; Sun, 29 Aug 2021 16:19:19 +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 17TGJ8j31177686; Sun, 29 Aug 2021 12:19:08 -0400 From: Tom Lane To: "ldh@laurent-hasson.com" cc: Ranier Vilela , Andrew Dunstan , Justin Pryzby , "pgsql-performance@postgresql.org" Subject: Re: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4 In-reply-to: References: <2092859.1629558281@sss.pgh.pa.us> <2136207.1629569846@sss.pgh.pa.us> <20210821191950.GW10479@telsasoft.com> <20210821221729.GY10479@telsasoft.com> <20210822154758.GZ10479@telsasoft.com> <30496.1629654632@sss.pgh.pa.us> <35729.1629660223@sss.pgh.pa.us> <846170.1630086205@sss.pgh.pa.us> <1050917.1630180243@sss.pgh.pa.us> <1124170.1630244105@sss.pgh.pa.us> Comments: In-reply-to "ldh@laurent-hasson.com" message dated "Sun, 29 Aug 2021 16:03:02 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1177684.1630253948.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 29 Aug 2021 12:19:08 -0400 Message-ID: <1177685.1630253948@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "ldh@laurent-hasson.com" writes: > Is it possible that the client I am using or the way I am creating the t= est database might affect this scenario? I use DBeaver and use the default= settings to create the database: > - default encoding: UTF8 > - collate: English_United States.1252 > - ctype: English_United States.1252 Yeah, I was thinking of quizzing you about that. I wonder whether something is thinking it needs to transcode to WIN1252 encoding and then back to UTF8, based on the .1252 property of the LC_XXX settings. That shouldn't account for any 500X factor either, but we're kind of grasping at straws here. Does Windows have any locale choices that imply UTF8 encoding exactly, and if so, do your results change when using that? Alternatively, try creating a database with WIN1252 encoding and those locale settings. regards, tom lane