Why I stopped reading Coding Horror
This is ridiculous, anyone who has used SQL Server for more then 5 minutes should know what (nolock) does. I knew the solution before even finishing reading his problem, and I am no SQL wizard.
It really upsets me that he is someone “respected” in the developer community and he can devote a whole blog post to this sounding like it was such a difficult problem to overcome.
How can a read be blocked by a write? What possible contention could there be from merely reading the data? It’s as if one of the dining philosophers happened to glance over at another philosoper’s plate, and the other philosopher, seeing this, screamed “meal viewing deadlock!” and quickly covered his plate with his hands. Yes, it’s ridiculous. I don’t want to eat your food — I just want to look at it.
The problem is he is basing his assumptions on an analogy which is wrong. The proper analogy is closer to one of the other Philosophers is trying to count how many grains of rice another philosopher has. If he wants accurate numbers the other Philosopher needs to stop eating so the number does not go down as he counts.