Re: Best practices for (plpgsql ?) trigger optimization? - Mailing list pgsql-general

From Karl O. Pinc
Subject Re: Best practices for (plpgsql ?) trigger optimization?
Date
Msg-id 1112379009l.10083l.3l@mofo
Whole thread Raw
In response to Best practices for (plpgsql ?) trigger optimization?  ("Karl O. Pinc" <kop@meme.com>)
List 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@meme.com>
Free Software:  "You don't pay back, you pay forward."
                -- Robert A. Heinlein





pgsql-general by date:

Previous
From: Lonni J Friedman
Date:
Subject: Re: diskspace usage recovered on db rebuild
Next
From: Scott Marlowe
Date:
Subject: Re: diskspace usage recovered on db rebuild