Re: How to EXPLAIN a trigger function

From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: 'Zdenek Belehrádek *EXTERN*' <zdenek(dot)belehradek(at)superhosting(dot)cz>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to EXPLAIN a trigger function
Date: 2015-08-17 13:25:25
Message-ID: A737B7A37273E048B164557ADEF4A58B50F92C76@ntex2010i.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Zdenek Belehrádek wrote:
> We
> would like to know if there is simple way to EXPLAIN the trigger function, so
> we could optimize it.

I believe that the auto_explain module could help you:
http://www.postgresql.org/docs/current/static/auto-explain.html

If you turn on "auto_explain.log_nested_statements" and set
"auto_explain.log_min_duration" low enough, the execution plans of
all SQL statements calle from a function will be logged.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2015-08-17 13:47:20 Re: stack depth
Previous Message Zdeněk Bělehrádek 2015-08-17 12:54:14 How to EXPLAIN a trigger function