Home > DeveloperSection > Interviews > What is difference between Optimistic and Pessimistic locking?

Posted on    January-27-2014 2:40 AM

 C# C# 
Ratings:
 1 Answer(s)
  1594  View(s)
Rate this:

Sumit Kesarwani

Total Post:782

Points:3910
Posted on    January-27-2014 1:00 AM

In Pessimistic locking when user wants to update data it locks the record and till then no one can update data. Other user’s can only view the data when there is pessimistic locking

In Optimistic locking multiple users can open the same record for updating, thus increase maximum concurrency. Record is only locked when updating the record.

Don't want to miss updates? Please click the below button!

Follow MindStick