Re: 14.1 immutable function, bad performance if check number = 'NaN'

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: 14.1 immutable function, bad performance if check number = 'NaN'
Дата
Msg-id CAKFQuwYxhRcyYDWiaoEPmQR06FDTbSr=P_mdMKaviLL-O19=4Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: 14.1 immutable function, bad performance if check number = 'NaN'  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Monday, April 25, 2022, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Federico Travaglini <federico.travaglini@aubay.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.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: 14.1 immutable function, bad performance if check number = 'NaN'
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: 14.1 immutable function, bad performance if check number = 'NaN'