So, every once in a while I really go brain-dead and do something silly that I laugh about later. This happened earlier this week, so I thought I'd write about it. I was working on a little presentation to a group of developers on writing performant SQL Server queries. I was in the process of writing an EXISTS() statement, and noticed that the execution plan didn't show the statement going out to disk to retrieve records. It was returning SUPER FAST. In my mind-set at the time, I thought...
Filed under: problem, error, developers, presentation, PRINT, criteria, count(*), disk, exists(), optimizer, sql server