From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mindaugas Riauba <mind@bi.lt>
Cc: pgsql-performance@postgresql.org
Subject: Re: Need advice about triggers
Date: Tue, 09 Sep 2003 10:40:48 -0400
Message-ID: <21262.1063118448@sss.pgh.pa.us> (raw)
In-Reply-To: <00dc01c376d6$f9f99c30$f20214ac@bite.lt>
References: <00be01c376cf$91510620$f20214ac@bite.lt>
<200309091414.23458.dev@archonet.com>
<00dc01c376d6$f9f99c30$f20214ac@bite.lt>
"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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, mind@bi.lt
Subject: Re: Need advice about triggers
In-Reply-To: <21262.1063118448@sss.pgh.pa.us>
References: <00be01c376cf$91510620$f20214ac@bite.lt> <200309091414.23458.dev@archonet.com> <00dc01c376d6$f9f99c30$f20214ac@bite.lt> <21262.1063118448@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox