Re: Slow query in trigger function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Guido Niewerth <gniewerth(at)ocsgmbh(dot)com>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Slow query in trigger function
Date: 2015-11-02 14:45:05
Message-ID: 24307.1446475505@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Guido Niewerth <gniewerth(at)ocsgmbh(dot)com> writes:
> As you can see theres a huge runtime difference between the select query used in the trigger function and the one run from the SQL editor.

contrib/auto_explain might be useful in seeing what's going on, in
particular it would tell us whether or not a different plan is being
used for the query inside the function.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Guido Niewerth 2015-11-02 16:54:21 Re: Slow query in trigger function
Previous Message Michael Paquier 2015-11-02 12:12:21 Re: PostgreSQL limitation