Re: Clearing plans

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: Clearing plans
Дата
Msg-id b42b73150701191102t4b35464bj7bc359f56407e15b@mail.gmail.com
обсуждение исходный текст
Ответ на Clearing plans  (Scott Ribe <scott_ribe@killerbytes.com>)
Ответы Re: Clearing plans  (Scott Ribe <scott_ribe@killerbytes.com>)
Список pgsql-general
On 1/18/07, Scott Ribe <scott_ribe@killerbytes.com> wrote:
> Is there a way to force a flush of all cached plans? Particularly, to force
> re-evaluation of immutable stored procedures? Don't worry, it's a testing &
> development thing, not something I want to do during production ;-)

Also, somebody correct me if I'm off my rocker here, but immutable
procedures are re-evaluated for each execution...they are just folded
into a constant during plan phase.   To demonstrate this:

create temp sequence s;
postgres=# create function f() returns void as $$ select nextval('s');
$$ language sql;
create view v as select * from f();
create function g() returns bigint as $$ begin return f(); end; $$
language plpgqsl;
select * from v;
 f
---
 1
(1 row)

postgres=# select * from v;
 f
---
 2
(1 row)

postgres=# select g();
 g
---
 3
(1 row)

postgres=# select g();
 g
---
 4
(1 row)

merlin

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Query Help
Следующее
От: "Jeremy Haile"
Дата:
Сообщение: Re: Index bloat of 4x