Dangers(?) of locking rows in multi-user applications.
Posted in 1995
Does anybody have any opinions on locking rows to prevent users accessing the same row? ( On line 7.1 ) Here's a thing. I hear so often about the dangers of locking rows during user input as this can cause "long" term transaction errors and others can trip over the lock receiving errors. Is it better to have an extra logical lock column on the row which indicates that another user has the row and therefore it is not available? Is it better to use "optimistic locking", whereby a mechanism is in place so that, if another user has changed a row since you accessed it, then you have to abandon your update? I tend towards optimistic locking, but would rather user Informix locks as they are simpler and after all intended for this use.