> -----Original Message----- > From: Tom Lane <[email protected]> > Sent: Friday, August 27, 2021 13:43 > To: [email protected] > Cc: Justin Pryzby <[email protected]>; Ranier Vilela > <[email protected]>; [email protected] > Subject: Re: Big Performance drop of Exceptions in UDFs between V11.2 > and 13.4 > > "[email protected]" <[email protected]> writes: > > That being said, do you have any suggestion how I could circumvent > the > > issue altogether? > > Based on Andrew's report, it seems like you might be able to work > around it for the time being by disabling message translations, i.e. > SET lc_messages = 'C'; > Even if that's not acceptable in your work environment, it would be > useful to verify that you see an improvement from it. > > regards, tom lane SET lc_messages = 'C'; drop table sampletest; create table sampletest (a varchar, b varchar); insert into sampletest (a, b) select substr(md5(random()::text), 0, 15), (100000000*random())::integer::varchar from generate_series(1,100000); CREATE OR REPLACE FUNCTION toFloat(str varchar, val real) RETURNS real AS $$ BEGIN RETURN case when str is null then val else str::real end; EXCEPTION WHEN OTHERS THEN RETURN val; END; $$ LANGUAGE plpgsql COST 1 IMMUTABLE; show lc_messages; -- OK 'C'
- RE: Big Performance drop of Exceptions in UDFs bet... [email protected]
- Re: Big Performance drop of Exceptions in UDFs bet... Tom Lane
- RE: Big Performance drop of Exceptions in UDFs bet... [email protected]
- Re: Big Performance drop of Exceptions in UDFs bet... Ranier Vilela
- Re: Big Performance drop of Exceptions in UDFs bet... Justin Pryzby
- RE: Big Performance drop of Exceptions in UDFs bet... [email protected]
- RE: Big Performance drop of Exceptions in UDFs bet... [email protected]
- Re: Big Performance drop of Exceptions in UDFs bet... Andrew Dunstan
- RE: Big Performance drop of Exceptions in UDFs bet... [email protected]
- Re: Big Performance drop of Exceptions in UDFs bet... Tom Lane
- RE: Big Performance drop of Exceptions in UDFs bet... [email protected]
- RE: Big Performance drop of Exceptions in UDFs bet... [email protected]
- Re: Big Performance drop of Exceptions in UDFs bet... Tom Lane
- RE: Big Performance drop of Exceptions in UDFs bet... [email protected]
- Re: Big Performance drop of Exceptions in UDFs bet... Ranier Vilela
- Re: Big Performance drop of Exceptions in UDFs bet... Tom Lane
- Re: Big Performance drop of Exceptions in UDFs bet... Ranier Vilela
- RE: Big Performance drop of Exceptions in UDFs bet... [email protected]
- Re: Big Performance drop of Exceptions in UDFs bet... Tom Lane
- RE: Big Performance drop of Exceptions in UDFs bet... [email protected]
- Re: Big Performance drop of Exceptions in UDFs bet... Julien Rouhaud
