Posts by Doug Lane

The Five Stages of Dynamic SQL Grief

Development
18 Comments
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

SQL Server
16 Comments
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!

#SQLPass
5 Comments
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

SQL Server
23 Comments
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

SQL Server
18 Comments
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

Humor, SQL Server
7 Comments
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]

Videos
8 Comments
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

The Day the SQL Server Quit [Video]

Videos
13 Comments
In this 5-minute video, Doug tells a story about a DBA whose SQL Server got fed up with being misconfigured and decided to do something about it. Topics include CPU settings like MAXDOP and Cost Threshold for Parallelism, memory and disk configuration.
Read More

Refactoring T-SQL with Windowing Functions

SQL Server, T-SQL, Videos
6 Comments
You’ve been querying comparative numbers like Year To Date and Same Period Last Year by using tedious CTEs and subqueries. Beginning with SQL Server 2012, getting these numbers is easier than ever! Join Doug for a 30-minute T-SQL tune-up using window functions that will cut down dramatically on the amount of code you need to…
Read More
Menu