Re: Best practices for (plpgsql ?) trigger optimization?

From: "Karl O(dot) Pinc" <kop(at)meme(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Best practices for (plpgsql ?) trigger optimization?
Date: 2005-04-01 18:10:09
Message-ID: 1112379009l.10083l.3l@mofo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 04/01/2005 10:19:55 AM, Karl O. Pinc wrote:
> Hi,
>
> Are there any best practices for optimizing triggers,
> and, I suppose, stored procedures as well?
>
> The solutions I see are to use:
>
> SET client_min_messages DEBUG1;
> SET debug_print_plan TRUE;
>
> and maybe
> SET log_executer_stats TRUE;

Ok, this strategy only works on a per-schema basis
as the way to get it to work is to set the
debug_print_plan before doing the
CREATE FUNCTION for the functions
you want to monitor. (Which might be hard
to do in a production environment.)
It's not something that happens on a per-session
basis.

(So far I've only tried this with regular stored
procedures, rather than triggers.)

(FYI: The above SET statements are missing TO as in
SET debug_print_plan TO TRUE;
)

Karl <kop(at)meme(dot)com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Fetter 2005-04-01 18:25:27 == PostgreSQL Weekly News - April 01 2005 ==
Previous Message Scott Marlowe 2005-04-01 17:51:31 Re: diskspace usage recovered on db rebuild