Search Suggest

A book a day! Review of the book "SQL Server Query Tuning and Optimization" by Benjamin Nevarez.

Hi Guys,

Welcome back!

I am very happy to review a new book, due out in August, about tuning and Optimization of SQL Server.

It is published by the english publishing company Packt and wrote by the well known Benjamin Neverez, this book will be very useful to anyone who wants to enter in the word of the tuning and Optimization.

You will find this book on sale from the 12 August.

 

The Review

First of all, let's say who this book is for.

This book is intended for anyone who wants to enter the world of SQL Server tuning and optimization.

I'll be clear, this book contains almost all the aspects you need to know to do this job.

Among the positive things I find the explanation of the concepts clearly stated and in this Nevarez knows how to do his job very well.

In addition, everything is updated to the latest SQL Server 2022 version.

 

What this book covers? ...let's see it in preview!

The book starts with an overview of the architecture of the SQL Server engine then move on to explain in detail how to use execution plans. "How to get them" and "how to analyze then" then.
This is because you cannot enter in great detail if you can't read an execution plan easily.
Your query is slow ... start there your controls look at its execution plan.
 
 


Second chapter talk about how get info from SQL Server. 
 
You will learn how to use  DMVs and DMFs
Microsoft created Dynamic management views and  Dynamic management functions to get for free and without any overhead a great quantity of infos. 
 
A little example:
Do you want to know what are the types of waiting for your client's sql server? There is an DMV!
Do you want to know what are most expensive queries? ...there is another DMV.
...and so on.

The book then continue talking about SQL Trace and Extended Events.

Third Chapter is about the Query Optimizer. 

Since it is the optimizer that must find the best way to return the data requested by the query, we need to understand how the optimizer work. I  must admit this is one of my favourite chapter.

You can find many of these concepts searching inside my blog.

 

Fourth chapter!

Another piece of theory well explained.

As the previous chapter this book is going deep into the internals of the Query Optimizer and the query processor operators.

Here you can learn about query operators employed in the exection plan created by the Query Optimizer.


The fifth chapter deals with the big topic of indexes.

Surely you can't not know what an index is.. and here you can learn it!

Tuning is also often done by adding an index.
Here we will see how to do it ... and how to see according to the system which indices are missing.



Sixth Chapter

If indexes are important because they allow quick access to data, perhaps statistics are even more important.
In fact, the statistics contain all the information (cardinality, distribuition of the data) needed by the optimizer to create an efficient execution plan.


Seventh Chapter.

A book that aims at a global view on the functioning of SQL Server cannot fail to mention this topic :-)

Chapter number 8

Here we talk about another of my favorite topics.

Often in our work we are faced with sniffing problems due to the fact that the execution plan is kept in memory to be reused later.
Let's see here how to solve these problems. 

The chapter talks also of the new feature called Parameter-sensitive plan optimization (PSP), introduced in SQL Server 2022.

Chapter number 9

Query store is also very useful especially than watching queries regress!


Chapter number 10

This is a very interesting chapter. Intellingent Query Processing (IQ) is a set of feature we have often talked about in our blog. 

I must say that each feature is well explained.


Chapter number 11

A complete book cannot fail to speak of columnstore indexes and bartchmode processing.


Chapter number 12

Last chapter is about Query Hints! A suggestion never understimate Hints that exection plan show.

Each hint may be responsible for creating a suboptimal execution plan!

 


My opinion

To conclude I must say I found this book exhaustive and of enjoyable reading.

Perhaps the only small lack is a chapter dedicated to the concept of Sargable Queries.
But this may perhaps be present in a second edition.

However, the book remains a valid and complete support to all the aspects that you need to know to be inside the world of tuning and optimization.


That's all friends, I hope you enjoyed and find useful this post!

If you find an advertisement that genuinely interests you, simply click it from on my blog, please.
This will help me keep writing more and more interesting content. ~Luke
 

 








Previous post:SQL Server 2022 and windowing improvements. Learn SQL with me!


Post a Comment