Inside the SQL Server Query Optimizer – Book Review

There are only a handful of people that when they talk about something you should sit up and take notice, and for me Benjamin Nevarez (blog|twitter) is one of those. As someone I’ve been following technically for several years, when I saw that his book “Inside the SQL Server Query Optimizer” had been released to the Kindle format, I immediately clicked the purchase button and I haven’t been disappointed.

What is particularly obvious upon reading is that Benjamin is not only a subject matter expert on the SQL Server Query Optimizer and Query Optimization, but is passionate and enthusiastic about it which translates directly onto the pages, making for a very enjoyable experience. Probably the biggest way in which this book differs from similar efforts by other experts in this area is the way in which it takes an inside-out approach to this subject rather than an outside-in approach and for me this methodology works really really well.

this is not a loop join!

If you can, try to imagine Query Optimization as being a bit like layers of an Onion with the Optimizer itself sitting firmly in the centre. When reading other books on the subject I have found myself getting quite frustrated as they slowly peel off each layer and never really seem to hit the centre. This always makes me feel as though I didn’t really know what happened behind the scenes (even if I understood the why). This book is different and Benjamin takes this metaphorical Onion and slices it in two revealing what lies in the centre and slowly building onto it bit by bit.

What I really like most about “Inside the SQL Server Query Optimizer” is the fact that it is not just a revealing read but a very practical guide to Optimization for the reader and demonstrates optimization with lots of pictures of example queries, query plans, statistics and estimations. What this means is that even if you are a relative beginner at Query Optimization this book will be readily accessible to you. Expert readers also have much to learn from its pages since the book pretty much covers everything you need to know about the Query Optimizer and Optimization.

One thing I particularly like is the fact that this book even talks about Optimizing Data Warehouse workloads and manages to keep the discussion at a level that is not only informative but understandable, and this is no small feat. I also love all those little tricks and tips provided throughout the book such as “right-click anywhere on the execution plan window to display a pop-up window and select Show Execution Plan XML…” as a way to quickly change your query plan into XML format -which can be very useful for third-party tools such as SQLSentry’s Plan Explorer. As somebody who infrequently has to look into Optimization these kind of tips are invaluable and leave you wondering how you’d missed them in the first place!

My only criticism I have that with this book is that Benjamin has left me wanting more from him! I therefore look forward to seeing further efforts from him and recommend that you add this to your own personal library without delay making it an essential purchase.

Before I close this review, it wouldn’t be complete without mentioning that the Kindle edition of the book has been beautifully rendered and contains colour for its diagrams rather than grey-scale pictures, which is a really nice touch for anyone using a Kindle App to read it their device. So regardless of whatever format you decide upon I am sure you won’t be disappointed.

3 thoughts on “Inside the SQL Server Query Optimizer – Book Review

  1. Benjamin Nevarez

    Wow, thanks Mark! I really appreciate your wonderful review!

    Yeah, I really should expand the book: I have already many pages of additional content, maybe for the next edition 🙂 I will be posting some of this content on my blog, some of it perhaps will only make sense on the book as it requires the background of a specific chapter.

    By the way, I think the only other time I have seen an onion analogy before is on the Shrek movie 🙂

    Thanks again,


    1. retracement Post author

      Sir you are most welcome! A volume II would be most excellent and I will of course keep watching your blog with a keen interest.

  2. akash aggarwal

    I am loving the book as well just read first 3 chapters but definitely good stuff so far.

Comments are closed.