Re: function cache effect still happening?

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: "Fernando Moreno" <azazel(dot)7(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: function cache effect still happening?
Date: 2008-05-30 13:37:13
Message-ID: b42b73150805300637n34f45169uaec699e73e04fb7b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, May 26, 2008 at 3:08 PM, Fernando Moreno <azazel(dot)7(at)gmail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jon Lapham 2008-05-30 14:06:02 Mediawiki 1.10 and PG 8.3 upgrade
Previous Message A B 2008-05-30 12:49:20 Connection problem