| From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
|---|---|
| To: | PFC <lists(at)peufeu(dot)com> |
| Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Cached Query Plans (was: global prepared statements) |
| Date: | 2008-04-13 15:09:07 |
| Message-ID: | 20080413150907.GB32735@svana.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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(at)svana(dot)org> http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Dawid Kuroczko | 2008-04-13 15:31:52 | Re: Cached Query Plans (was: global prepared statements) |
| Previous Message | Kris Jurka | 2008-04-13 14:25:54 | Re: [Pljava-dev] stack depth limit exceeded - patch possible? |