NOLOCK in RCSI

Sometimes intersection of two simple ideas can make me look out of the window and gasp. Extreme cases lead to Kotov syndrome. When I was working as full time production DBA there were few moments when my ‘I know - I know’ (which is third and final level of understanding matter) became ‘I think I know’ (second stage, just above ‘black box’) because of particular combination of simple ideas. It didn’t happen often and maybe that’s why these situations are hard to forget:

Sound of NOT IN operator

Every time I see or think of using NOT IN operator my head makes loud submarine dive alarm sound. Yours should too! Despite large number of articles and books that explain how does NOT IN operator work and describe what can go wrong, I can spot it in the wild again and again. It’s easy to explain why it requires special attention, but imaginary cost and energy savings seem to be greater.