Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.

The SQL Server Query Optimizer is perceived by many to be a magic black box, transforming SQL queries into high performance execution plans in the blink of an eye through some unknowable process. The truth is that, while the Query Optimizer is indeed the highly-complex result of decades of research, learning how it works its magic is not only possible, but immensely useful to database developers and administrators alike. A better understanding of what the Query Optimizer does behind the scenes can help you to improve the performance of your databases and applications, and this book explains the core concepts behind how the SQL Server Query Optimizer works. With this knowledge, you'll be able to write superior queries, provide the Query Optimizer with all the information it needs to produce efficient execution plans, and troubleshoot the cases when the Query Optimizer is not giving you the best plan possible. With over 15 years of experience in the use of Relational Databases (including SQL Server since version 6.5), Benjamin has watched the SQL Server Relational Engine grow and evolve. His insight will leave you with an excellent foundation in the practicalities of the Query Optimizer, and everything you need to know to start tuning your queries to perfection.

Top customer reviews

After hearing about this book several months before its release, I waited eagerly for it and was not disappointed once I finally got to read it. I've worked with SQL Server for about three years and am constantly learning and discovering new things. The query optimizer was one of those things that both fascinated and perplexed me, as it can be overwhelming to look at an execution plan and figure exactly what it's doing let alone why the optimizer chose to use it. Benjamin Nevarez's "Inside the SQL Server Optimizer" is a great tool for anyone interested in understanding what happens under the hood when you execute a query. In my opinion, it's a must have for any serious SQL developer or DBA.

It definitely helps on understanding the "black magic" behind the query optimizer. The great book advantage is that you can find in a single place several information that would take a lot to dig into the web (if you would have find the right ones, of course).

SQL Server is a very conprehensive product and to learn it takes time and specialized knowlege - this book is that. One of most critical elements of SQL Server is understanding and managing query performance and this book is a very good authority, well organized and written. Well worth the price, highly recommended

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

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.

There are many books out there on SQL Server. The problem is once you've reached a certain level of expertise in SQL Server there is very little extra to learn from most of them.

'Inside the SQL Server Query Optimizer' was very different. The author dives into the guts of the optimizer and shows how it produces query plans using indexes, statistics and a whole host of other factors to determine the best likely operators. He also does a fantastic job of tying the concepts back to actual queries and execution plans that you can reproduce in SQL Server Management studio. I found the book lucidly written and the new insights I gained from it immensely useful for optimizing my databases and queries.

If you know something about SQL Server, I highly recommended to get you to the next level!

Firstly, two thumbs up for the "to the point" content of the book.Even though it took a while for me to read this book, or rather I should say 'comprehend' it, the book felt not too long and not too short, I realized the content is just adequate/right to a more than a beginner in SQL Server, but I just wanted to experiment in my test environment in addition to what was in the book, as the end result today I have 11 queries optimized to save my customers total of 4 hours plus of wasted CPU time!Secondly, there are so few books around on the "mysterious" Query Optimizer, to most consultants in my practice it was always intimidating to even think of trying to figure out what is going "behind the scenes", I guess this should not be anymore the case.In short, do you want to learn on the most complicated and advanced topic from a 15 year veteran in SQL Server for a fraction of the cost of any class? You bet!