Re: Need advice about triggers

From: Richard Huxton <dev(at)archonet(dot)com>
To: "Mindaugas Riauba" <mind(at)bi(dot)lt>, <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Need advice about triggers
Date: 2003-09-09 14:40:51
Message-ID: 200309091540.51382.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
big_update_test.pl text/x-perl 1.3 KB

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Hannu Krosing 2003-09-09 15:18:03 Re: Need advice about triggers
Previous Message Tom Lane 2003-09-09 14:40:48 Re: Need advice about triggers