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