Optimistic vs. Pessimistic locking

I understand the differences between optimistic and pessimistic locking. Now could someone explain to me when I would use either one in general? And does the answer to this question change depending on whether or not I’m using a stored procedure to perform the query? But just to check, optimistic means “don’t lock the table … Read more