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


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faqs/FAQ.html

Reply via email to