Book Review: High Performance SQL Server

As SQL Server professionals, we sometimes encounter some issues that we haven’t seen before or have seen already but forgot how we fixed them. There are few things that we usually do in these situations: Diagnose using sp_whoisactive or sp_Blitz, or any other tools that we have at our disposal, try to remember what we did to troubleshoot the issues, fire up our Wait Stats queries, check DMVs or maybe Extended Events, etc.

If none of these work, then we do what normal data pros usually do in desperate times: Google stuff or maybe post a question or two on Twitter using the hashtag #sqlhelp. But the problem is that the information that we need is all over the interwebs. There is just too much information but little time to look at each one of them.

If you are like me, you still find technical books to be relevant these days. And I mean the real, physical books. Great technical books offer high-value content that is readily available in one place (that is if you picked the right book for your purpose). Plus, if you’re looking to unplug, reading books is a good way to pry yourself away from the screen. For example, High-Performance SQL Server: The Go Faster Book by Benjamin Nevarez (B|T). I recently added this book to my SQL Server shelf.

Some of you know that I started a new job this year with a software company that caters to the retail industry (our clients are big brand retailers). Part of my day-to-day job is troubleshooting performance issues on SQL Server. So aside from reading technical blogs, I read technical books to improve my skills.

Let’s go back to Ben’s book. With only 200 pages, this book is not overwhelming to read. Yes, it’s short and it doesn’t have all the things about SQL Server but, I think, it has all the important things that I need to know. And, yes, it covers up to SQL Server 2016. It has 9 Chapters:

High Performance SQL Server

  1. How SQL Server Works
  2. Analyzing Wait Statistics
  3. The Query Store
  4. SQL Server Configuration
  5. TempDB Troubleshooting and Configuration
  6. SQL Server In-Memory Technologies
  7. Performance Troubleshooting
  8. Indexing
  9. SQL Server Storage

The chapters that I found important (of course, this is relevant to who is reading the book) are 2, 5, 7, and 8.

Chapter 2 deals with Wait Stats. We love Wait Stats. If you are like me, you probably have SQL Server Wait Statistics: Tell Me Where It Hurts query from Paul Randal (B|T) in your arsenal. I haven’t perfected the Wait Statistics methodology of performance tuning yet and this is why I like this chapter. This chapter “explains how the task execution process fits into waits and queues performance methodology”. I know what processes are waiting but why they are waiting is the most important question to answer. This chapter discusses waiter list, runnable queues, task execution process, Extended Events, Latches and Spinlocks, Blocking and many other things about analyzing wait statistics.

Chapter 5 is about TempDB. One of the common issues that I encounter in my job is issues with TempDB running out of space although there is enough physical disk space for the TempDB files. When an application is doing tons of concurrent tasks that depend heavily on TempDB, you may want to be proactive about the health of you TempDB. Well, according to Brent Ozar (B |T), TempDB is the public toilet of SQL Server, so we better keep it clean. The information from this chapter will help you maintain the TempDB and keep it sanitary. Topics discussed are fixing latch contention, data file pages, Trace Flag 1117 & 1118, tempdb events, TempDB spills, monitoring TempDB disk space, etc.

Chapter 7 covers the overall performance troubleshooting. The topics discussed are performance counters, comparing batches and transactions, log growth, other DMVs not discussed in previous chapters, SQL Trace & Extended Events, Data Collector, what’s new in SQL 2016, etc.

Chapter 8 is about Indexes. This chapter explains how SQL Server uses indexes. It also offers tips on where to use indexes, how to work with indexes and how to use the execution plans, missing indexes feature, Database Engine Tuning Advisor & Index Tuning Wizard, etc. One does not simply over-study indexes.

Ben Nevarez is one of the people I respect and look up to in the SQL Server Community because of what they do in helping other SQL Server professionals grow in their career and personal life. But this is not the only reason why I like this book. The topic selections and how they were delivered in a minimal number of pages ensure that I get the information that I most need to know about performance tuning and not get overwhelmed learning about them.

This book is a good complementary material to Pro SQL Server Internals: Understand What Happens Under The Hood and How it Affects You by Dmitri Korotkevitch (B|T) from the same publisher as Ben’s, which I also have.

Author: Marlon Ribunal

I am SQL Server Database Administrator for a software company catering to supply chain and retail industry.