title: Optimistic vs. Pessimistic locking
body: <p>I understand the differences between optimistic and pessimistic locking.  Now could someone explain to me when I would use either one in general?</p>
  
  <p>And does the answer to this question change depending on whether or not I'm using a stored procedure to perform the query?</p>
  
  <p>But just to check, optimistic means "don't lock the table while reading" and pessimistic means "lock the table while reading."</p>