Thread: Execution plan caching

Execution plan caching

From
Oliver Kohll
Date:
Hi,
Does anyone know whether postgres caches its execution plans,
http://www.saturn5.com/~jwb/dbi-performance.html#stage2 ?

Hope so because I've just changed all of the queries in my code to use DBI's
bind_param. If not, will be useful if we ever port to Oracle anyway ;-)

If so, is the cache per db connection or does it remain across disconnects and
connects, i.e. will I have to use mod_perl to get the most advantage?

--
Regards,
Oliver
www.gtwebmarque.com

Re: Execution plan caching

From
nconway@klamath.dyndns.org (Neil Conway)
Date:
On Sat, Jul 27, 2002 at 01:51:25AM +0000, Oliver Kohll wrote:
> Does anyone know whether postgres caches its execution plans

No, not at the moment.

There will be limited support for this in 7.3, assuming my patch gets
into CVS. More complete support will need to wait for a change in the
FE/BE protocol, which looks like it might happen for 7.4

Cheers,

Neil

--
Neil Conway <neilconway@rogers.com>
PGP Key ID: DB3C29FC

Re: Execution plan caching

From
Oliver Kohll
Date:
ok, thanks
On Saturday 27 July 2002 8:20 pm, you wrote:
> On Sat, Jul 27, 2002 at 01:51:25AM +0000, Oliver Kohll wrote:
> > Does anyone know whether postgres caches its execution plans
>
> No, not at the moment.
>
> There will be limited support for this in 7.3, assuming my patch gets
> into CVS. More complete support will need to wait for a change in the
> FE/BE protocol, which looks like it might happen for 7.4
>
> Cheers,
>
> Neil

Re: Execution plan caching

From
Tom Lane
Date:
nconway@klamath.dyndns.org (Neil Conway) writes:
> On Sat, Jul 27, 2002 at 01:51:25AM +0000, Oliver Kohll wrote:
>> Does anyone know whether postgres caches its execution plans

> No, not at the moment.

We *do* cache plans for queries occurring inside plpgsql functions.

            regards, tom lane