@HannahVernon ▯ Name: White Vertical Rectangle. What's it mean in this context - I don't get it... maybe it's too early on a Sunday morning here (it's 06:17)...
Thanks for the JEAGL! Re my putative love affair with regexes - take a look here where I actually answer a question with an already accepted regex based answer with a non-regex based alternative!
@SergeyZolotarev They're quite different things really, depending on which definitions you are using. Lock modes and compatibility and one possible way to implement different isolation levels. Isolation levels offer different degrees of isolation guarantee, as the name implies. Stronger isolation requires stronger or longer locks in general.
But "pessimistic write" isn't a term I hear very often. I couldn't give you a definition of it without looking it up.
This is probably going to be the least technical answer, so apologies if I get the semantics wrong. But I was frustrated with the complexity of the language in the previous answers, so I decided to post a simple answer:
PESSIMISTIC_READ: you obtain a lock on the record at the start of the transa...
PESSIMISTIC_READ maps to REPEATABLE_READ isolation level
PESSIMISTIC_WRITE doesn't have a direct mapping to a named isolation level
In SQL Server, it would require something like WITH (XLOCK, REPEATABLE_READ) hints.