From: | Hannu Krosing <hannu(at)tm(dot)ee> |
---|---|
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 15:18:03 |
Message-ID: | 1063120683.6150.43.camel@fuji.krosing.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Mindaugas Riauba kirjutas T, 09.09.2003 kell 15:40:
> Hello,
>
> I have small table (up to 10000 rows) and every row will be updated
> once per minute. Table also has "before update on each row" trigger
> written in plpgsql. But trigger 99.99% of the time will do nothing
> to the database. It will just compare old and new values in the row
> and those values almost always will be identical.
>
> Now I tried simple test and was able to do 10000 updates on 1000
> rows table in ~30s. That's practically enough but I'd like to have
> more room to slow down.
Is it 10000 *rows* or 10000*1000 = 10 000 000 *rows* updated ?
When I run a simple update 10 times on 1000 rows (with no trigger, which
you claim to take about the same time) it took 0.25 sec.
> Also best result I achieved by doing commit+vacuum every ~500
> updates.
It seems like you are updating more than one row at each update ?
---------------
Hannu
From | Date | Subject | |
---|---|---|---|
Next Message | Vivek Khera | 2003-09-09 16:08:55 | Re: increase performancr with "noatime"? |
Previous Message | Richard Huxton | 2003-09-09 14:40:51 | Re: Need advice about triggers |