Categories: Book Review

Book Review – SQL Server Query Tuning and Optimization (2nd Edition)

The nice people from Packt Publishing sent me a digital copy of Benjamin Nevarez new book to review: SQL Server Query Tuning and Optimization – Optimize Microsoft SQL Server 2022 queries and applications. It says first edition on the cover, but that’s because it’s the first time this book has been published by Packt. The actual first edition was about SQL Server 2014 (Microsoft SQL Server 2014 Query Tuning & Optimization) and was published by MC Graw Hill.

I’ve read Benjamin’s first book, and it was one of my favorites as it explained query tuning in depth, but still in a way normal people can understand it. So I was looking forward to read this book, and it didn’t disappoint me. It’s similar to it’s precursors, but obviously updated for SQL Server 2022. It’s a bit over 400 pages long, but almost all content is very relevant.

I still like this book very much. It has improved over the previous one by adding chapters about the Query Store, Query Hints, Intelligent Query Processing and SQL Server 2022. You can learn a lot about the inner workings of the SQL Server query optimizer and how statistics work and why there are so important. It never is too overly technical or complicated, and the author really succeeds in bringing across his vast knowledge of the subject areas. The book also has a lot useful queries ready for troubleshooting tasks which you can immediately add to your toolbox. An advantage – in my opinion – is that the book is independent of hardware and server configuration; it only talks about SQL Server itself. However, it doesn’t really touch upon Azure SQL Database. The only downside I could find is the lack of case studies. I would have liked for example a small chapter (or maybe an appendix) where the author starts with a few problematic queries and then applies all the knowledge of the previous chapters to troubleshoot them and find the root cause of the performance issue so he can suggest a solutions for these problems (adding an index, different database settings, rewriting the query, …).

Conclusion This book will be useful for everyone who needs to write queries on SQL Server and wants to know how to start with query tuning and optimization (but I wouldn’t recommend it for people just starting out with SQL Server though). It is also a great set of reference material on deeper technical subjects, such as the optimizer, query plans and statistics. Even the seasoned T-SQL developer will probably find something useful in this book. I definitely recommend this book.


------------------------------------------------
Do you like this blog post? You can thank me by buying me a beer 🙂
Koen Verbeeck

Koen Verbeeck is a Microsoft Business Intelligence consultant at AE, helping clients to get insight in their data. Koen has a comprehensive knowledge of the SQL Server BI stack, with a particular love for Integration Services. He's also a speaker at various conferences.

Recent Posts

Free webinar – Tackling the Gaps and Islands Problem with T-SQL Window Functions

I'm hosting a free webinar at MSSQLTips.com at the 19th of December 2024, 6PM UTC.…

5 days ago

dataMinds Connect 2024 – Session Materials

The slides and scripts for my session "Tackling the Gaps & Islands Problem with T-SQL…

4 weeks ago

Connect to Power BI as a Guest User in another Tenant

Sometimes your Microsoft Entra ID account (formerly known as Azure Active Directory) is added as…

2 months ago

How to use a Script Activity in ADF as a Lookup

In Azure Data Factory (ADF, but also Synapse Pipelines and Fabric Pipelines), you have a…

4 months ago

Database Build Error – Incorrect syntax near DISTINCT

I wrote a piece of SQL that had some new T-SQL syntax in it: IS…

4 months ago

Speaking at dataMinds Connect 2024

I'm very excited to announce I've been selected as a speaker for dataMinds Connect 2024,…

5 months ago