Re: Performance problems testing with Spamassassin 3.1.0 - Mailing list pgsql-performance

From John Arbash Meinel
Subject Re: Performance problems testing with Spamassassin 3.1.0
Date
Msg-id 42EA759A.60807@arbash-meinel.com
Whole thread Raw
In response to Re: Performance problems testing with Spamassassin 3.1.0  (Josh Berkus <josh@agliodbs.com>)
List 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
=:->


Attachment

pgsql-performance by date:

Previous
From: "Luke Lonergan"
Date:
Subject: Re: [PATCHES] COPY FROM performance improvements
Next
From: "Jeffrey W. Baker"
Date:
Subject: Re: Performance problems on 4/8way Opteron (dualcore) HP