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

From Richard Huxton
Subject Re: Need advice about triggers
Date
Msg-id 200309091540.51382.dev@archonet.com
Whole thread Raw
In response to Re: Need advice about triggers  ("Mindaugas Riauba" <mind@bi.lt>)
List pgsql-performance
On Tuesday 09 September 2003 14:33, Mindaugas Riauba wrote:
> > 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.

OK - no point in rewriting it then.

> > If not, you're probably saturating the disk I/O - using iostat/vmstat
> > will
>
> let
>
> > you see what's happening. If it is your disks, you might see if moving
> > the WAL onto a separate drive would help, or check the archives for
> > plenty of discussion about raid setups.
>
>   Bottleneck in this case is CPU. postmaster process uses almost 100% of
> CPU.

>   Disk I/O should not be a problem in this case. vmstat shows ~300kb/s
> write activity.

Hmm - I must admit I wasn't expecting that. Closest I can get on my test
machine here: AMD 400MHz / 256MB / IDE disk / other stuff running is about 20
secs.

I've attached the perl script I used - what sort of timings does it give you?

--
  Richard Huxton
  Archonet Ltd

Attachment

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Need advice about triggers
Next
From: Hannu Krosing
Date:
Subject: Re: Need advice about triggers