Re: [PERFORM] Query much slower when run from postgres function

Поиск
Список
Период
Сортировка
От Guillaume Cottenceau
Тема Re: [PERFORM] Query much slower when run from postgres function
Дата
Msg-id 87bps9ls4f.fsf@meuh.mnc.lan
обсуждение исходный текст
Ответ на Re: [PERFORM] Query much slower when run from postgres function  (Oliver Jowett <oliver@opencloud.com>)
Ответы Re: [PERFORM] Query much slower when run from postgres function
Список pgsql-jdbc
Oliver Jowett <oliver 'at' opencloud.com> writes:

> The idea behind the threshold is that if a PreparedStatement object is
> reused, that's a fairly good indication that the application wants to
> run the same query many times with different parameters (since it's
> going to the trouble of preserving the statement object for reuse). But

Or it may just need the safeness of driver/database parameter
"interpolation", to get a "free" efficient safeguard against SQL
injection. As for myself, I have found no other way to obtain
driver/database parameter interpolation. So sometimes I use
prepared statements even for running a query only once. I am
unsure it is a widely used pattern, but SQL injection being quite
important to fight against, I think I may not be the only one.

--
Guillaume Cottenceau

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Renaming sequence auto generated by SERIAL type don't update pg_attrdef
Следующее
От: Oliver Jowett
Дата:
Сообщение: Re: [PERFORM] Query much slower when run from postgres function