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

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: 14.1 immutable function, bad performance if check number = 'NaN'
Дата
Msg-id CAHyXU0ye7LvS0W+MOvV40TVMaw5fF0OrogF2TGq4jHBHvVo+LA@mail.gmail.com
обсуждение исходный текст
Ответ на 14.1 immutable function, bad performance if check number = 'NaN'  (Federico Travaglini <federico.travaglini@aubay.it>)
Ответы R: 14.1 immutable function, bad performance if check number = 'NaN'
Список pgsql-bugs
On Mon, Apr 25, 2022 at 11:58 AM Federico Travaglini <federico.travaglini@aubay.it> wrote:

Good evening, and thanks to your excellent Postgres.

 

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.


lightly testing this, I got 10million iterations in about two seconds, about the same after commenting the NaN test.  Given that, problem is probably failure to inline query.  Careful examination of explain of wrapping query should prove that.

merlin

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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: 14.1 immutable function, bad performance if check number = 'NaN'
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17468: Ranking of search results: ts_rank_cd with normalization variant 4