Failure to use generic plans (was: Re: Performance problem in PLPgSQL)

Поиск
Список
Период
Сортировка
От Andrew Gierth
Тема Failure to use generic plans (was: Re: Performance problem in PLPgSQL)
Дата
Msg-id 0e6d70debaf899bfbf37edcdfbd03e21@news-out.riddles.org.uk
обсуждение исходный текст
Ответ на Performance problem in PLPgSQL  (Marc Cousin <cousinmarc@gmail.com>)
Список pgsql-hackers
As failures to use a generic plan goes, that one's fairly tame. I've
seen much worse. For example:

PREPARE foo(integer[]) AS SELECT * FROM complexview WHERE id = ANY ($1);

where the caller typically supplies 1-5 array elements (or any number
less than 10, because generic parameter arrays are assumed to have 10
elements). This one can be a massive performance regression between
9.1 and 9.2; the first guy who mentioned this on IRC was getting a 40x
slowdown (~20ms planning time vs. 0.5ms execution time).

-- 
Andrew (irc:RhodiumToad)



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Performance problem in PLPgSQL
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: Review: UNNEST (and other functions) WITH ORDINALITY