RE: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4 (workarounds)

2021-08-29 Thread l...@laurent-hasson.com
> -Original Message- > From: Justin Pryzby > Sent: Sunday, August 29, 2021 23:17 > To: Pavel Stehule > Cc: l...@laurent-hasson.com; Tom Lane ; Ranier > Vilela ; Andrew Dunstan > ; pgsql-performa...@postgresql.org > Subject: Re: Big Performance drop of Exc

Re: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4 (workarounds)

2021-08-29 Thread Justin Pryzby
On Mon, Aug 30, 2021 at 04:43:23AM +0200, Pavel Stehule wrote: > po 30. 8. 2021 v 2:44 odesílatel l...@laurent-hasson.com napsal: > > At this point, I am not sure how to proceed except to rethink that > > toFloat() function and many other places where we use exceptions. We get > > such dirty data t

Re: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4

2021-08-29 Thread Pavel Stehule
Hi po 30. 8. 2021 v 2:44 odesílatel l...@laurent-hasson.com < l...@laurent-hasson.com> napsal: > > > > At this point, I am not sure how to proceed except to rethink that > toFloat() function and many other places where we use exceptions. We get > such dirty data that I need a "safe" way to conver

Re: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4

2021-08-29 Thread Julien Rouhaud
On Mon, Aug 30, 2021 at 8:44 AM l...@laurent-hasson.com wrote: > > Yeah, grasping at straws... and no material changes 😊 This is mystifying. > > show lc_messages; > -- English_United States.1252 > > create table sampletest (a varchar, b varchar); > insert into sampletest (a, b) > select substr(md5

Re: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4

2021-08-29 Thread Ranier Vilela
Em dom., 29 de ago. de 2021 às 21:29, l...@laurent-hasson.com < l...@laurent-hasson.com> escreveu: > > > From: Ranier Vilela > Sent: Sunday, August 29, 2021 14:20 > To: l...@laurent-hasson.com > Cc: Tom Lane ; Andrew Dunstan ; > Justin Pryzby ; pgsql-performa...@postgresql.org > Subject: Re: Big

RE: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4

2021-08-29 Thread l...@laurent-hasson.com
> -Original Message- > From: Tom Lane > Sent: Sunday, August 29, 2021 12:19 > To: l...@laurent-hasson.com > Cc: Ranier Vilela ; Andrew Dunstan > ; Justin Pryzby ; pgsql- > performa...@postgresql.org > Subject: Re: Big Performance drop of Exceptions in UDFs

RE: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4

2021-08-29 Thread l...@laurent-hasson.com
From: Ranier Vilela Sent: Sunday, August 29, 2021 14:20 To: l...@laurent-hasson.com Cc: Tom Lane ; Andrew Dunstan ; Justin Pryzby ; pgsql-performa...@postgresql.org Subject: Re: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4 Em dom., 29 de ago. de 2021 às 13:03, mailto:l...

Re: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4

2021-08-29 Thread Ranier Vilela
Em dom., 29 de ago. de 2021 às 13:03, l...@laurent-hasson.com < l...@laurent-hasson.com> escreveu: > >Sure, there's no question that message translation will have *some* cost. > >But on my machine it is an incremental tens-of-percent kind of cost, > >and that is the result you're getting as well.

Re: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4

2021-08-29 Thread Tom Lane
"l...@laurent-hasson.com" writes: > Is it possible that the client I am using or the way I am creating the test > 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

RE: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4

2021-08-29 Thread l...@laurent-hasson.com
>Sure, there's no question that message translation will have *some* cost. >But on my machine it is an incremental tens-of-percent kind of cost, >and that is the result you're getting as well.  So it's not very clear >where these factor-of-several-hundred differences are coming from. >A hypothesis

Re: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4

2021-08-29 Thread Ranier Vilela
Em dom., 29 de ago. de 2021 às 10:35, Tom Lane escreveu: > Ranier Vilela writes: > > I retested this case with HEAD, and it seems to me that NLS does affect > it. > > Sure, there's no question that message translation will have *some* cost. > But on my machine it is an incremental tens-of-percen

Re: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4

2021-08-29 Thread Tom Lane
Ranier Vilela writes: > I retested this case with HEAD, and it seems to me that NLS does affect it. Sure, there's no question that message translation will have *some* cost. But on my machine it is an incremental tens-of-percent kind of cost, and that is the result you're getting as well. So it'

Re: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4

2021-08-29 Thread Ranier Vilela
Em sáb., 28 de ago. de 2021 às 22:55, l...@laurent-hasson.com < l...@laurent-hasson.com> escreveu: > > >> -Original Message- >> From: Tom Lane >> Sent: Saturday, August 28, 2021 15:51 >> To: l...@laurent-hasson.com >> Cc: Andrew Dunstan ; Justin Pryzby >> ; R