Re: Need advice about triggers

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Mindaugas Riauba" <mind(at)bi(dot)lt>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Need advice about triggers
Date: 2003-09-09 14:40:48
Message-ID: 21262.1063118448@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Mindaugas Riauba" <mind(at)bi(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Richard Huxton 2003-09-09 14:40:51 Re: Need advice about triggers
Previous Message scott.marlowe 2003-09-09 13:39:06 Re: Need advice about triggers