At first glance, Inside SQL Server Query Tuning and Optimization, appears to be a multiple-author ensemble book with only 1½ chapters written by Kalen, which might be disappointing. However, the reality is that this database dream team is hand-picked by Kalen, and following Kalen’s plan the book meets the high standards Kalen is known for. The flow of the information is the right way to understand and then solve query performance issues.
Chapter 1 – A Performance Troubleshooting Methodology by Sunil Agarwal (Program Manager in the SQL Server Storage Engine Group at Microsoft.) The opening chapter introduces the many factors that influence query performance. Although it fails to connect every dot, the chapter is a comprehensive overview of SQL Server performance and a sound intro for readers without a solid background in SQL Server.
Chapter 2 – Tracing and Profiling by Adam Machanic (SQL Server MVP. Leader of the New England SQL Server User Group in Boston, and all around smart guy.) Even if you use Profiler daily, you’ll pick up some useful info in this thorough converge of SQL Server Engine Trace and the Profiler UI.
Chapter 3 – Query Execution by Craig Freedman (Microsoft SQL Server Query Execution Team.) This chapter has more beef than a 16 oz filet in Kansas City. Wow. If you enjoy reading Query execution plans, then you’ll read this chapter 3 or 4 times. There’s deep knowledge in here you won’t find anywhere else. I’ve lost sleep wondering about some of the questions answered by this chapter, and I’ve lost more sleep reading it.
Chapter 4 – Troubleshooting Query Performance by Kalen Delaney and Craig Freedman. This is the practical part two of Craig’s amazing chapter 3. Here Kalen and Craig show exactly how to diagnose and solve difficult query performance issues.
Chapter 5 – Plan Caching and Recompilation by Kalen Delaney. This is the topic Kalen presented at the 2007 PASS Summit pre-con and her depth shows in this chapter. Since query plan caching is so important to executing queries, this chapter makes perfect sense in this book.
Chapter 6 – Concurrency Problems by Ron Talmage (SQL Server MVP, and true gentleman. Ron leads the Pacific Northwest SQL Server Users Group which meets in Building 35, the SQL Server team building on the MIcrosoft Redmond campus.) In any high transaction production system, diagnosing and tuning locking and blocking is the difference between “it runs on my notebook” and “it runs with thousands of users.” Ron goes beyond the basic explanation of locks and isolation levels to explain how to resolve specific conncurency issues.
Book prerequisite: at least 2-3 years of writing SQL Server queries and a decent understanding of SQL Server.
Like Kalen’s other books, Inside SQL Server Query Tuning and Optimization, is readable, authoritative, and a requirement on every serious database developer’s desk. Buy it once and read it at least twice.