Re: Retaining execution plans between connections?

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: Retaining execution plans between connections?
Дата
Msg-id 1137770099.9330.12.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Retaining execution plans between connections?  (James Russell <internationalhobo@gmail.com>)
Список pgsql-performance
On Fri, 2006-01-20 at 18:14 +0900, James Russell wrote:
> I am looking to speed up performance, and since each page executes a
> static set of queries where only the parameters change, I was hoping
> to take advantage of stored procedures since I read that PostgreSQL's
> caches the execution plans used inside stored procedures.

Note that you can also take advantage of plan caching by using prepared
statements (PREPARE, EXECUTE and DEALLOCATE). These are also session
local, however (i.e. you can't share prepared statements between
connections).

> As I said, I can't share the DB connection between pages (unless
> someone knows of a way to do this and still retain a level of
> separation between pages that use the same DB connection).

You can't share plans among different sessions at the moment. Can you
elaborate on why you can't use persistent or pooled database
connections?

-Neil



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

Предыдущее
От: Pandurangan R S
Дата:
Сообщение: Re: Retaining execution plans between connections?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Extremely irregular query performance