From: John Arbash Meinel <john@arbash-meinel.com>
To: josh@agliodbs.com
Cc: Dennis Bjorklund <db@zigo.dhs.org>
Cc: Matthew Schumacher <matt.s@aptalaska.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: Performance problems testing with Spamassassin 3.1.0
Date: Fri, 29 Jul 2005 13:29:46 -0500
Message-ID: <42EA759A.60807@arbash-meinel.com> (raw)
In-Reply-To: <200507291038.04230.josh@agliodbs.com>
References: <Pine.LNX.4.44.0507290835100.7470-100000@zigo.dhs.org>
<200507291038.04230.josh@agliodbs.com>
Josh Berkus wrote:
>Dennis,
>
>
>
>> EXCEPTION WHEN unique_violation THEN
>>
>>
>
>I seem to remember that catching an exception in a PL/pgSQL procedure was a
>large performance cost. It'd be better to do UPDATE ... IF NOT FOUND.
>
>
>
Actually, he was doing an implicit UPDATE IF NOT FOUND in that he was doing:
UPDATE
IF found THEN return;
INSERT
EXCEPT
...
So really, the exception should never be triggered.
John
=:->
Attachments:
signature.asc (application/pgp-signature, 255B) download
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: john@arbash-meinel.com, josh@agliodbs.com, db@zigo.dhs.org, matt.s@aptalaska.net
Subject: Re: Performance problems testing with Spamassassin 3.1.0
In-Reply-To: <42EA759A.60807@arbash-meinel.com>
* 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