From: Neil Conway <neilc@samurai.com>
To: James Russell <internationalhobo@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Retaining execution plans between connections?
Date: Fri, 20 Jan 2006 10:14:59 -0500
Message-ID: <1137770099.9330.12.camel@localhost.localdomain> (raw)
In-Reply-To: <3a3a16930601200114p27ccb3fdn750286898f39c405@mail.gmail.com>
References: <3a3a16930601200114p27ccb3fdn750286898f39c405@mail.gmail.com>
On Fri, 2006-01-20 at 18:14 +0900, James Russell wrote:
> I am looking to speed up performance, and since each page executes a
> static set of queries where only the parameters change, I was hoping
> to take advantage of stored procedures since I read that PostgreSQL's
> caches the execution plans used inside stored procedures.
Note that you can also take advantage of plan caching by using prepared
statements (PREPARE, EXECUTE and DEALLOCATE). These are also session
local, however (i.e. you can't share prepared statements between
connections).
> As I said, I can't share the DB connection between pages (unless
> someone knows of a way to do this and still retain a level of
> separation between pages that use the same DB connection).
You can't share plans among different sessions at the moment. Can you
elaborate on why you can't use persistent or pooled database
connections?
-Neil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: neilc@samurai.com, internationalhobo@gmail.com
Subject: Re: Retaining execution plans between connections?
In-Reply-To: <1137770099.9330.12.camel@localhost.localdomain>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox