Re: [HACKERS] Cache query (PREPARE/EXECUTE)

Marc G. Fournier <scrappy@hub.org>

From: The Hermit Hacker <scrappy@hub.org>
To: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2000-02-22T16:27:40Z
Lists: pgsql-hackers
On Tue, 22 Feb 2000, Karel Zak - Zakkr wrote:

> The queryTree and planTree are save in hash table and in the 
> TopMemoryContext (Is it good space for this cache?). All is
> without change-schema detection (IMHO is user problem if he
> changes DB schema and use old cached plan). In future I try

Just curious, but a new 'PREPARE name AS...' with the same name just
overrides the previously saved plan?

Actually, can someone who may know the internals of DBI comment on
this?  If I have a CGI that runs the same SELECT call each and every time,
this would come in handy ... but how does DBI do its prepare?  Would it
set a new name for each invocation, so you would have several 'cached
plans' for the exact same SELECT call?

Marc G. Fournier                   ICQ#7615664               IRC Nick: Scrappy
Systems Administrator @ hub.org 
primary: scrappy@hub.org           secondary: scrappy@{freebsd|postgresql}.org