
Why should I consider optimistic versus pessimistic approaches to database updates?

Hi Friend,
Use Pessimistic locking if the lock period is short while for long lock period, it is better to use Optimistic locking. It will improve the overall performance.
If there are too many transactions then it is better to use pessimistic locking as the roll-back cost can exceed the locking cost.
Thanks