Re: Need advice about triggers - Mailing list pgsql-performance

From Tom Lane
Subject Re: Need advice about triggers
Date
Msg-id 21262.1063118448@sss.pgh.pa.us
Whole thread Raw
In response to Re: Need advice about triggers  ("Mindaugas Riauba" <mind@bi.lt>)
List pgsql-performance
"Mindaugas Riauba" <mind@bi.lt> writes:
>> Well, try it without the trigger. If performance improves markedly, it
>> might be worth rewriting in C.

>   Nope. Execution time is practically the same without trigger.

>> If not, you're probably saturating the disk I/O -

>   Bottleneck in this case is CPU. postmaster process uses almost 100% of
> CPU.

That seems very odd.  Updates should be I/O intensive, not CPU
intensive.  I wouldn't have been surprised to hear of a plpgsql trigger
consuming lots of CPU, but without it, I'm not sure where the time is
going.  Can you show us an EXPLAIN ANALYZE result for a typical update
command?

            regards, tom lane

pgsql-performance by date:

Previous
From: "scott.marlowe"
Date:
Subject: Re: Need advice about triggers
Next
From: Richard Huxton
Date:
Subject: Re: Need advice about triggers