Posts by Doug Lane

The Five Stages of Dynamic SQL Grief

Dynamic SQL can be an incredibly powerful tool in the pocket of a SQL Server developer. Developers frequently express amazement at the level of flexibility dynamic SQL offers, an astonishment at how quickly things get out of hand, and finally the humbling realization that such machinery nearly tore their limbs off. This process can be…
Read More

Announcing: Level Up Your T-SQL

You spend at least an hour or two each day writing T-SQL code. You have a pretty good hunch that it’s not as fast or crisp as it should be, and you wonder if you’re missing a few techniques. You’ve heard about date tables and windowing functions, but you’re just not comfortable with ’em yet.…
Read More

I’m Killing It at PASS Summit 2015!

I’m delighted and honored to be presenting two sessions at the 2015 PASS Summit in Seattle: “Living and Dying by Dynamic SQL” and “SQL Server Mystery: Dead Reports Don’t Talk”. Since I’ve never done either of these sessions at the Summit before, here’s a little more information about the sessions to help you decide whether to attend:…
Read More

Database Connection Hazards with Entity Framework

I recently came across a curious case where a SQL Server was suffering a number of long-running queries coming from an application written in Entity Framework. When I measured the average query execution times, I got some unexpected results: CPU time: 12 milliseconds Reads: 273 Elapsed time: 6800 milliseconds Wait, what? Looking at the wait stats…
Read More

Three Easy Tweaks to Tune Up Your SQL Server

I’ve been doing SQL Critical Care® work with clients for over a year now. It’s absolutely true that every client’s situation is different and needs special attention. However, I’ve found that there’s a short list of issues that nearly all clients have in common. Drawing from that list, here are the top three high-impact, low-effort areas you can work…
Read More

Overheard in Performance Tuning Training Class

A sampling of things overheard at our 2015 Performance Troubleshooting Class in Denver: “I’m not a GUID hater.” “Oh, God help me. I’ve clicked on XML.” “Reporting Services looks around at the available memory, makes itself at home, maybe takes its pants off.” “Where would I go to check if I — hypothetically — accidentally set…
Read More

Doug Broke It: Minimal Logging [Video]

In this 5-minute video, Doug explains how he kept filling SQL Server’s transaction log during ETL development, and how minimal logging could have prevented a lot of the log writes. You’ll learn about: What minimal logging is How to turn minimal logging on How to tell if minimal logging is working Using minimal logging for…
Read More