Re: Cached Query Plans (was: global prepared statements)

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Cached Query Plans (was: global prepared statements)
Дата
Msg-id 20080413150907.GB32735@svana.org
обсуждение исходный текст
Ответ на Re: Cached Query Plans (was: global prepared statements)  (PFC <lists@peufeu.com>)
Список pgsql-hackers
On Sun, Apr 13, 2008 at 02:26:04PM +0200, PFC wrote:
> * global plan cache in shared memory, implemented as hashtable, hash key
> being the (search_path, query_string)
> Doubt : Can a plan be stored in shared memory ? Will it have to be copied
> to local memory before being executed ?

Frankly, I think you're better off storing them in a table. Shared
memory is a limited resource and you cannot change how much you've
allocated after the server has started. It does mean you'll have to
serialise/deserialise them, but this will be cheaper than replanning,
right?

I liked your global prepared statements idea much better. Named the
statements is no problem: DB frontends do that for you anyway
sometimes.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

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

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: [Pljava-dev] stack depth limit exceeded - patch possible?
Следующее
От: "Dawid Kuroczko"
Дата:
Сообщение: Re: Cached Query Plans (was: global prepared statements)