From: Tom Lane <tgl@sss.pgh.pa.us>
To: Guido Niewerth <gniewerth@ocsgmbh.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Slow query in trigger function
Date: Mon, 02 Nov 2015 09:45:05 -0500
Message-ID: <24307.1446475505@sss.pgh.pa.us> (raw)
In-Reply-To: <d9752446b5164156836d9bb97bacfe58@EX2k13.ocsnet.local>
References: <d9752446b5164156836d9bb97bacfe58@EX2k13.ocsnet.local>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
Guido Niewerth <gniewerth@ocsgmbh.com> writes:
> As you can see there“s 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
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, gniewerth@ocsgmbh.com
Subject: Re: Slow query in trigger function
In-Reply-To: <24307.1446475505@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox