Re: Performance problems testing with Spamassassin 3.1.0

From: John Arbash Meinel <john(at)arbash-meinel(dot)com>
To: josh(at)agliodbs(dot)com
Cc: Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org>, Matthew Schumacher <matt(dot)s(at)aptalaska(dot)net>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Performance problems testing with Spamassassin 3.1.0
Date: 2005-07-29 18:29:46
Message-ID: 42EA759A.60807@arbash-meinel.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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
=:->

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Jeffrey W. Baker 2005-07-29 18:55:42 Re: Performance problems on 4/8way Opteron (dualcore) HP
Previous Message Luke Lonergan 2005-07-29 17:54:08 Re: [PATCHES] COPY FROM performance improvements