Re: [PERFORM] Why is the number of dead tuples causing the performance

2004-08-18 Thread DeJuan Jackson
Since you are updating all of the sets with the specified part number why not just ensure that a transaction never inserts the same part number more than once (an INSERT ...SELECT ... WHERE NOT EXISTS(...) comes to mind), then delete the row before the end of transaction. Frank van Vugt wrote:

Re: [PERFORM] Why is the number of dead tuples causing the performance of deferred triggers to degrade so rapidly (exponentionally)?

2004-08-18 Thread Frank van Vugt
Hi Josh, > > It seems in this case the time needed for a single deferred trigger > > somehow depends on the number of dead tuples in the table After further investigation I think I have a better grasp of what's going on. The thing biting me here is indeed the 'delete from' on a table with a numb

Re: [PERFORM] Why is the number of dead tuples causing the performance of deferred triggers to degrading so rapidly (exponentionally)?

2004-08-17 Thread Josh Berkus
Frank, > It seems in this case the time needed for a single deferred trigger somehow > depends on the number of dead tuples in the table, because a vacuum of the > table will 'reset' the query-times. However, even if I wanted to, vacuum is > not allowed from within a function. > > What is happenin

[PERFORM] Why is the number of dead tuples causing the performance of deferred triggers to degrading so rapidly (exponentionally)?

2004-08-17 Thread Frank van Vugt
Obviously, this part of tr_f_def(): ** -- delete the contents -- delete from f; IF EXISTS (SELECT 1 FROM f) THEN DELETE FROM F; VACUUM F; END IF; **

[PERFORM] Why is the number of dead tuples causing the performance of deferred triggers to degrading so rapidly (exponentionally)?

2004-08-17 Thread Frank van Vugt
Hi, I'm seeing the following behaviour with the table and functions given below: db=# insert into f select * from full_sequence(1, 1000); INSERT 0 1000 Time: 197,507 ms db=# insert into f select * from full_sequence(1, 1000); INSERT 0 1000 Time: 341,880 ms db=# insert into f select * from full_se