Re: [PERFORM] Need advice about triggers

2003-09-10 Thread Hannu Krosing
Mindaugas Riauba kirjutas K, 10.09.2003 kell 13:21: > > router_db=# explain analyze update ifdata set ifspeed=256000, > ifreason='12121', iflastupdate=CURRENT_TIMESTAMP WHERE clientid='#0003904#'; > QUERY PLAN >

Re: [PERFORM] Need advice about triggers

2003-09-10 Thread Mindaugas Riauba
> >> 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

Re: [PERFORM] Need advice about triggers

2003-09-09 Thread Hannu Krosing
Mindaugas Riauba kirjutas T, 09.09.2003 kell 15:40: > Hello, > > I have small table (up to 1 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

Re: [PERFORM] Need advice about triggers

2003-09-09 Thread Richard Huxton
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 pr

Re: [PERFORM] Need advice about triggers

2003-09-09 Thread Tom Lane
"Mindaugas Riauba" <[EMAIL PROTECTED]> 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

Re: [PERFORM] Need advice about triggers

2003-09-09 Thread scott.marlowe
On Tue, 9 Sep 2003, Mindaugas Riauba wrote: > > Hello, > > I have small table (up to 1 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

Re: [PERFORM] Need advice about triggers

2003-09-09 Thread Mindaugas Riauba
> > How can I improve performance and will version 7.4 bring something > > valuable for my task? Rewrite to some other scripting language is not > > a problem. Trigger is simple enough. > > Well, try it without the trigger. If performance improves markedly, it might > be worth rewriting in C.

Re: [PERFORM] Need advice about triggers

2003-09-09 Thread Rod Taylor
> How can I improve performance and will version 7.4 bring something > valuable for my task? Rewrite to some other scripting language is not > a problem. Trigger is simple enough. Your best bet is to have additional clients connected to the database requesting work. Approx NUMCPUs * 2 + 1 seems

Re: [PERFORM] Need advice about triggers

2003-09-09 Thread Richard Huxton
On Tuesday 09 September 2003 13:40, Mindaugas Riauba wrote: > Hello, > > I have small table (up to 1 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 databa

[PERFORM] Need advice about triggers

2003-09-09 Thread Mindaugas Riauba
Hello, I have small table (up to 1 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 value