Re: function cache effect still happening? - Mailing list pgsql-general

From Merlin Moncure
Subject Re: function cache effect still happening?
Date
Msg-id b42b73150805300637n34f45169uaec699e73e04fb7b@mail.gmail.com
Whole thread Raw
In response to Re: function cache effect still happening?  ("Fernando Moreno" <azazel.7@gmail.com>)
List pgsql-general
On Mon, May 26, 2008 at 3:08 PM, Fernando Moreno <azazel.7@gmail.com> wrote:
> On the other hand, perhaps this problem could have been avoided by creating
> the same function in every schema. That way the function cache and query
> plans would be harmless. Am I right?

yes. I have done partitioning exactly you have several time in the
past...it's pretty powerful.

You can also force a reconnect when you manipulate search_path.  I
personally think adding the same function to every schema is lame and
would prefer reconnect if you can fit it in.  Of course, you can also
use dynamic sql everywhere but this also has drawbacks.

There has been some consensus on solving this problem...namely to have
the stored plans to be hashed out over search path (so, if your
database has 10 identical schemas, you could have up to 10 stored
plans for each function).   btw, prepared statements are also an
issue.

merlin

pgsql-general by date:

Previous
From: User Map
Date:
Subject: Fw: Distance w.r.t scalebar and postgre distance query
Next
From: Jon Lapham
Date:
Subject: Mediawiki 1.10 and PG 8.3 upgrade