Execution plan caching

Started by Oliver Kohllover 23 years ago4 messagesgeneral
Jump to latest
#1Oliver Kohll
oliver@gtwebmarque.com

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

#2Neil Conway
neilc@samurai.com
In reply to: Oliver Kohll (#1)
Re: Execution plan caching

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

#3Oliver Kohll
oliver@gtwebmarque.com
In reply to: Neil Conway (#2)
Re: Execution plan caching

ok, thanks

Show quoted text

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

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Neil Conway (#2)
Re: Execution plan caching

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