Targeted Plan Cache Removal

Azure, SQL Server 2008, SQL Server 2012, SQL Server 2014, TSQL
A lot of times you'll hear how people are experiencing sudden, intermittent, poor performance on a query, bad parameter sniffing at work, so they'll fix it by running the following code: [crayon-5a6ce76be5fe5656191042/] BOOM! Yeah, you just nuked the cache on your server because you wanted to take out a single terrorist query. Now, yes, that problematic query is going to recompile and hopefully have a better execution plan. Also, so are all the other queries on your system. That spike in CPU and the slow-down all your business people are experiencing... Your fault for going nuclear. Instead of a nuke, why not use a sniper rifle to just remove the one problematic plan. Here's a little piece of code to help out: [crayon-5a6ce76be5ff1936553186/] Take a look at the documentation for FREEPROCCACHE.…
Read More

More Surface

I’m continuing to work with the Surface. BOOM I just had my first crash. I was in IE when I tried to switch tabs and the pull down window would not stay open. So I tried closing IE. That didn’t work at all. I tried switching to the Start window or switching apps. No joy. I then did a hard restart, holding down the power button for about 10 seconds. On restarting, the system started updating itself, which was weird since I had made sure to do all the updates when I started. The update finished, I logged in, and noticed that the wifi symbol looked funny (wish I had a screen capture, ooh, is there a utility for that?). No big deal until I tried connecting to the wifi…
Read More