Re: Performance problem on RH7.1

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Performance problem on RH7.1
Дата
Msg-id 29248.1088446222@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Performance problem on RH7.1  (Együd Csaba <csegyud@vnet.hu>)
Ответы Re: Performance problem on RH7.1  (Együd Csaba <csegyud@vnet.hu>)
Список pgsql-general
=?iso-8859-2?Q?Egy=FCd_Csaba?= <csegyud@vnet.hu> writes:
>> I'd also suggest dropping the EXECUTE approach, as this is costing you
>> a re-plan on every call without buying much of anything.

> Do you mean I should use PERFORM instead? Or what else?
> Do you mean the "for R in execute" statements? How can I run a dynamic query
> in other way?

No, I mean the most straightforward way:

   for R in select ... where stockid = $1 and ...

This lets plpgsql cache the plan for the SELECT.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Inconsistant DOW...
Следующее
От: Greg Stark
Дата:
Сообщение: Re: Plperlu and sending emails, is it safe?