| From: | Richard Huxton <dev(at)archonet(dot)com> |
|---|---|
| To: | pginfo <pginfo(at)t1(dot)unisoftbg(dot)com>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org> |
| Subject: | Re: Trigger question |
| Date: | 2004-01-15 16:10:38 |
| Message-ID: | 200401151610.38270.dev@archonet.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-performance |
On Thursday 15 January 2004 13:13, pginfo wrote:
> Hi,
>
> I am using pg 7.4.1 and have created a trigger over table with 3 M rows.
> If I start masive update on this table, pg executes this trigger on
> every row and dramaticaly slows the system.
> Exists in pg any way to define the trigger execution only if I have
> changes on some fields?
Not at the moment (and I don't know of any plans for it).
> For example I am able to declare this in oracle.
> My trigger is writen in pgSQL.
Hmm - I can only think of two things you can try:
1. check for the change first thing you do and exit if not there
2. do the same, but write the trigger function in 'C'
--
Richard Huxton
Archonet Ltd
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jeremy M. Guthrie | 2004-01-15 16:37:41 | Question about space usage: |
| Previous Message | Rigmor Ukuhe | 2004-01-15 16:02:52 | Weird query speed |