Bad phenomena that can occur under NOLOCK (2 minutes)

Transcript

Another way to say this, a more academic way to say this, is to talk about the phenomena that can happen with the read uncommitted isolation level.

These phenomena are not just specific to SQL Server, they are specified as {part of the} definitions of different isolation levels that you can have in a relational database system.

Under read uncommitted you can have non-repeatable reads and phantom reads

You can also have those in read committed.

The thing that is special about read _un_committed is that you can have dirty reads as well.

Under read uncommitted you can read data that has not committed and that may never be committed

Data that isn’t reasonable or reliable in the SQL Server.

We are just gambling that that data is going to be committed and we are gambling that it is valid. With the way database systems work, there are going to be times when it is not valid. There are going to be times when it’s wrong.

These are all synonyms for dirty reads. If you’re saying NOLOCK, you’re saying it’s okay if the data is incorrect. You’re also saying it’s okay if the data is baloney. It’s okay if the data is crapola. It needs to be okay for the data to be bilge. I didn’t even know the word bilge before this presentation.

It’s okay for the data to be hogwash if I am going to use this hint.