Subject How to hold lock on record
Author Bogusław Brandys
Assume that I had to update some integer value in sigle row in
particular table and I hold lock on this single record using for example

update table set number=number + 1 where id=?

If I do that in the final stage of my transaction instead of just on
start would this row be shorter locked or it doen't matter ?
Updating this row is bottleneck for my application right now, but I
suspect becouse I lock record (and increment stored value) just in ON
BEFORE INSERT trigger.



Regards
Bogusław Brandys