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

Book Review – Microsoft Power BI Performance Best Practices

I was asked to do a review of the book Microsoft Power BI Performance Best…

3 days ago

Create a Numbers Table in Power Query

This is a quick blog post, mainly so I have the code available if I…

7 days ago

Microsoft finally adds Tenant Switcher for Fabric / Power BI

Praise whatever deity you believe in, because it's finally here, a tenant switcher for Microsoft…

1 week ago

Book Review – Humanizing Data Strategy by Tiankai Feng

This book was making its rounds on social media, and the concept seems interesting enough…

1 week ago

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.…

3 weeks ago

dataMinds Connect 2024 – Session Materials

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

1 month ago