From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Federico Travaglini <federico(dot)travaglini(at)aubay(dot)it>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: 14.1 immutable function, bad performance if check number = 'NaN' |
Date: | 2022-04-25 19:06:25 |
Message-ID: | CAKFQuwYxhRcyYDWiaoEPmQR06FDTbSr=P_mdMKaviLL-O19=4Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Monday, April 25, 2022, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Federico Travaglini <federico(dot)travaglini(at)aubay(dot)it> writes:
> > This funcion in used as a column in a select on about 400k records
> > If I leave the highlighted row it takes 27 seconds, otherwise 14 seconds!
> > Such behaviour looks not to be reasonable.
>
> It's not at all clear which line you think is the "highlighted" one.
>
>
Its the comparison of the double input value to the untyped literal ‘NaN’
(the first case test).
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Merlin Moncure | 2022-04-25 19:24:25 | Re: 14.1 immutable function, bad performance if check number = 'NaN' |
Previous Message | Tom Lane | 2022-04-25 19:03:32 | Re: 14.1 immutable function, bad performance if check number = 'NaN' |