|Subject||Re: [IBO] Re: Please. A solution with TRANSACTIONS for this problem|
> Problems with the sweep interval????Make sure you are not committing with every insert - as in such cases
the sweep interval could be causing your problems (defaults to kick in
every 20000 transactions).
Ensure you are using an explicit transaction with AutoCommit set
Also, I see your procedure looks like...
> CREATE PROCEDURE INS_UPD (PID VARCHAR(6),Note that attempting an insert and then catching the failure may be
> PNAME VARCHAR(50))
> begin insert into test(id,name,numb) values ( :pId, :pName, 1);
> when sqlcode -803 do
> update test
> set numb=numb+1
> where id=:pId;
inappropriate in your situation. You may find you get better
performance by explicitly doing what you expect the above code to do
IF (EXISTS(SELECT ID FROM TEST WHERE ID=:pId)) THEN
I am not sure if this will make any difference or not, it depends on
the internals of the engine.
Geoff Worboys - TeamIBO