The best execution plan book ever written

1 Comment
It all started back in 2012 – yes, six years ago! That was when I was first asked if I wanted to be the technical reviewer for Grant Frtichey’s book on execution plans. I obviously said yes … and then a lot of time passed because first Grant was busy, then we decided to wait for the SQL Server 2014 changes to become clear, and then yet other things intervened. Actual work started just over three years ago. If I had known back then that it would take this long, that I would spend so much time on this book,…
Read More

T-SQL Tuesday #105: Brick walls

1 Comment
It’s the second Tuesday of August already, and that means it’s T-SQL Tuesday time. This month’s topic, chosen by Wayne Sheffield (b|t), is to write about brick walls we ran into and how we dealt with the situation. Thinking about this topic, I remembered two moments in my career where I really was stuck … and then got unstuck in two very different ways. The unconscious solution The first event I want to share took place a long time ago. It was early in my career, my first programming job in fact. My job was to maintain and improve some…
Read More

Plansplaining, part 8. To join the impossible join

This is part eight of the plansplaining series. Each of these posts takes an execution plan with an interesting pattern, and details exactly how that plan works. In this post we look at a query that, given the known limitations of the available join operators, appears to be impossible to execute. But it’s a legal query so it should run. And it does. But how? Sample query The query below can be executed in any version of the AdventureWorks sample database. Don’t bother understanding the logic, there is none. It is merely constructed to show how SQL Server handles what…
Read More

My thoughts on session levels

Almost every conference I go to, either as speaker or as an attendee, indicates the level of sessions. Sometimes this is done with a description (beginner / intermediate / advanced), more often with a number (typically 100 – 200 – 300 – 400 – 500, though I have seen other scales as well). This is obviously a good thing to do. If you are just new in the field, attending a highly advanced session would be a waste of time. And if you have many years of experience then you will probably not learn much from a beginner-level session. But…
Read More

T-SQL Tuesday #104: Make Ola backup BizTalk

In 2009, Adam Machanic (b|t) started the monthly blog event known as T-SQL Tuesday. One person picks a topic, and everyone is invited to blog about it on the second Tuesday of the month. The July 2018 host is Bert Wagner (b|t), and his chosen topic is: Code You Would Hate To Live Without. Talk about a broad topic! I could fill a book on that topic, and the same probably goes for many others. But since my time is limited, I have decided to cherry-pick just two of my favorite scripts. This post is about the second: a small…
Read More

T-SQL Tuesday #104 (part 1): sp_metasearch

In 2009, Adam Machanic (b|t) started the monthly blog event known as T-SQL Tuesday. One person picks a topic, and everyone is invited to blog about it on the second Tuesday of the month. The July 2018 host is Bert Wagner (b|t), and his chosen topic is: Code You Would Hate To Live Without. Talk about a broad topic! I could fill a book on that topic, and the same probably goes for many others. But since my time is limited, I have decided to cherry-pick just two of my favorite scripts. This post is about the first: sp_metasearch. Impact…
Read More

Plansplaining, part 7. The Constant Scan that returns no data

This is part seven of the plansplaining series. Each of these posts takes an execution plan with an interesting pattern, and details exactly how that plan works. In this post we look at a deceptively simple query: a simple SELECT with an ISNULL to show either a row returned or a placeholder value. And yet there is more going on under the covers than one might expect. Sample query The query below can be executed in any version of the AdventureWorks sample database. It returns a code string representing the version number on the 2016 and 2017 versions; on older…
Read More

Plansplaining, part 6. Aggregates with OVER.

This is the sixth post in the plansplaining series. Each of these blog posts focuses on a sample execution plan that exposes an uncommon and interesting pattern, and details exactly how that plan works. In the first post, I covered each individual step of each operator in great detail, to make sure that everyone understands exactly how operators work in the pull-based execution plans. In this post (and all future installments), I will leave out the details that I now assume to be known to my readers. If you did not read part 1 already, I suggest you start there.…
Read More

Announcing: The SQL Server Execution Plan Reference

As some of you might already know, Grant Fritchey is working hard on updating his book on execution plans. The refreshed and much-improved third edition should release “real soon now”. And I happen to be involved in this project, as technical editor. While working on that book, I often ran into interesting and intriguing details in the execution plans. Details that, more often than not, are well beyond the scope of the book. So they will not be included, and rightly so. But it felt like a shame to have that information not available anywhere. Or scattered across the internet…
Read More

T-SQL Tuesday #102: Announcing a new site

Back in 2009, Adam Machanic (b|t) started an initiative that is still going strong: T-SQL Tuesday. This is a monthly blog party. Every second Tuesday of each month, lots of people blog about the same topic, selected by the host for that month. The May 2018 edition, better known as #102, is hosted by Riley Major (b|t). His challenge for this month: give back to the community. Pick an activity to help the community, explain your choice, and then commit to it. And include an ETA. If ever I saw a scary T-SQL Tuesday challenge, this has to be it.…
Read More

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close