Image

Rowgoals, part 2: Rowgoals in unexpected places

No Comments
In my previous vlog, I showed how and why the optimizer uses a rowgoal in the execution plan when your query uses a TOP or FETCH expression. Those are the keywords where this rowgoal is very obvious. Unexpected rowgoals But it’s not always that obvious. There are several other situations where rowgoals can be used, and some of them can be very unexpected! https://youtu.be/QwgiPTDMGQM More of me? Was this useful to you? Do you want to learn more from me? You can click here to see an overview of my scheduled conference visits. If you attend one of those, you…
Read More
A picture that shows several soccer goals, aligned in rows.

Rowgoals, part 1: How do rowgoals work?

No Comments
For my second vlog, I decided to talk about rowgoals. First an explanation of what they are, then an overview of some obvious and some not so obvious cases where the optimizer will use a rowgoal, and finally a warning about cases where this normally beneficial feature might hurt instead of help. And then, after recording and editing, I had a video of over 35 minutes. I felt that this might be too long for the format of these vlogs. But that is just my assumption. So I decided to verify, by opening this poll on LinkedIn  (which, by the…
Read More
Image

Storage structures 1 – On-disk rowstore

No Comments
When a query is slow, it is often caused by inefficient access to the data. So our tuning work very frequently comes down to figuring out how data was read, and then massaging our queries or database structures to get SQL Server to access the data in a more efficient way. So we look at scans, seeks, and lookups. We know that scans are good when we access most of the data. Or, in the case of an ordered scan, to prevent having to sort the data. We know that seeks are preferred when there is a filter in the…
Read More
Image

Self-promo: Precon opportunities

No Comments
I am normally not very good at promoting myself. I always forget to use the social media banners that conference organizes helpfully send me. And while I do have a list of upcoming speaking engagements on this site, I don’t really push it in your face at every opportunity. But the organizers of SeaQL 2026 pushed me. They asked me to record a video, to explain what attendees can expect when they sign up for my precon. And then, the fantastic Tonie Huizer went one step further, and created a YouTube short out of my promo video! The obvious next…
Read More
Image

Problems purchasing videos?

No Comments
I started the SQLServerFast Execution Plan Video Training in 2020. At that time, I chose Vimeo as the platform to use for hosting and selling my videos. The major reason for this choice was their advertised ability to sell video access to customers across the world, so that everyone, regardless of location, can buy access to my videos and learn to read execution plans. Not in India! Two months ago, I received an email from someone who lives in India. When he tried to buy access to my videos, he received an error message: “This video is not for your…
Read More
A dark figure called "danger", armed with a knife, is chasing a running DBA.

A new experiment for 2026

1 Comment
It is January 1st, 2026. So let me first use this opportunity to wish all my readers a very good 2026, with lots of performance gains in your servers, lots of new insights into SQL Server, … but most of all, lots of love and happiness in your personal lives. Video blogging? It started when Erik Darling tempted me, even though I doubt he remembers. He has been vlogging for a long time already, and he basically dared me to try it too. I didn’t. Not at that time. But the seed was planted. During this year, I had several…
Read More
Image

A deep dive into hash tables, part 4

No Comments
This is the last part of my blog series about the internals of hash tables in SQL Server. In part 1, I introduced a trick to get data returned in the order of the hash table, that I used in part 2 to gain an understanding of its internals. I then built on that in part 3 to find examples of hash collisions. With that, the discussion of the in-memory structure of a hash table is over. But what if we run out of memory and have to spill to tempdb? How is the spilled data stored on disk? I…
Read More
Image

T-SQL Tuesday 191 – String parsing (and why I hate intelligent keys)

13 Comments
Welcome to the delayed 191st T-SQL Tuesday. Our host is, once more, Steve Jones. This time, he asks us to write about our favorite string parsing. Which is an odd thing to ask: nobody ever said “I like doing string manipulation in T-SQL”. So instead of doing what Steve asked, I will provide some background, and they show some tricks that might make the task a bit less unpleasant. Why intelligent keys are anything but intelligent I am currently most known for my performance tuning and execution plan work. But when I started working with database, I actually came from…
Read More
Image

Black Friday 2025

No Comments
It’s October. Almost time for the annual Black Friday tradition, where companies prove how large their regular margins are by giving deep discounts to all their customers. Since the margin on my SQLServerFast Execution Plan Video Training is 100% (if we conveniently fail to count the hundreds of hours of labour I put in), I can also jump this bandwagon. I have done so in previous years, and by now I guess my regulars almost expect me to. So, let’s not disappoint people. Like previous years, during the entire month of November 2025, all video purchases are discounted by a…
Read More
Image

A deep dive into hash tables, part 3

No Comments
Welcome back! In the previous parts, I first showed how a Hash Match (Left Outer Join) can give insight in the order of data in a hash table, and then used that trick to obtain and verify some interesting insights into the internal structure of such a table. It’s now time to see if this same trick can also be used to find hash collisions. The foundation for this part are these two conclusions from the previous parts: Unmatched rows from the left (top) input are returned bucket by bucket, with rows that are in the same bucket returned in…
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