Sort Thread Numbers Correctly in SSMS Operator Properties

Dyslexical



Sort Thread Numbers Correctly in Operator Properties

Thanks for watching!

Video Summary

In this video, I delve into a minor but irritating graphical quirk in SQL Server Management Studio (SSMS) that has been bugging me for some time now. It’s not just an SSMS issue; it seems to manifest in other places within the SQL Server ecosystem as well. The problem arises when looking at execution plans, specifically in parallel operators, where the sorting of properties pane entries becomes erratic and frustratingly out of order—especially when dealing with more than nine threads. I walk through a workaround for this issue, explaining how to navigate around it by opening tooltips and manually selecting rows, but ultimately, I encourage viewers to voice their frustration through Microsoft’s User Voice platform. By voting on the relevant issue, we can collectively push for improvements in SSMS, making it a more pleasant environment for query tuning and analysis.

Full Transcript

Erik Darling. Bum, bum, bum. He still does not own ErikDarling.com because I’m a cheapskate and I don’t want to pay $1,500 for my own name on the internet. That seems a little outlandish to me. Maybe when it gets down under $1,000, I’ll do it. Anyway, it’s now Sunday, apparently, and today’s broadcast is brought to you by Dom Perignon 2009. And this was brought home from the lovely restaurant, per se. This is their wine stopper thing that they gave us for the bottle. I don’t know that they normally give these out, but it’s the coolest thing that I own now. So, if they want to sponsor me in other ways, I would happily take their sponsorship. But anyway, today’s video is about a minor graphical annoyance that I have with SQL Server Management Studio. Now, this is not the only place that you’ll see an oddity like this. There are many other places within SQL Server. Gosh, this smells good.

Oh, this is not the only place that you can do. Within SQL Server Management Studio where you’ll see this. Maybe it happens in Azure Data Studio, too. I don’t know. I refuse to install that. Anyway, here’s what it is. So, we have this query that does dumb things, admittedly dumb things. I know it’s dumb. I know it’s stupid looking. I know it serves absolutely no purpose in what it does. But when we look at the execution plan, more importantly, when we dive into the parallel operators of the execution plan, something aggravating happens. So, let’s go do what we should do as professional query tuners, always.

Open up the properties pane and let’s open this up. Now, completely ignoring the fact that this is the best parallel skew demo ever written. Open up the properties pane. What the hell is going on here? And then down here. Why? Why? Now, the other place where this used to come up is in the wait stats. So, I think it was… Maybe it was… I can’t remember if it was an SSMS version that fixed it or a SQL Server version that fixed it. It would make sense that it was an SSMS version that fixed it.

But who knows? If you looked at the wait stats, the wait stats would be sorted incorrectly, too. So, that actually is apparently fixed now. But, you know, good. But we still have this problem. And this problem persists across… Ah, come on. So, here’s another funny thing. Sometimes when you go to get the properties, the tooltip shows up. And then you can’t get them because the tooltip shows up over the properties.

And who knows where that is? So, what you have to do is be sneaky, a sneaky little rabbit. And you have to get the tooltip and then hit properties and then crack that open and then highlight that row so that we preserve it. We preserve the positioning across all these operators and go click. And look, they all sort wonky.

The sorting is a muck. Well, except on this one where there’s nothing happening because that’s a gather stream. So, if we crack this one open… Well, this one… I mean, at least the skew is gone here. Alright? At least we don’t have the skew here, but we still have this quite unfortunate sorting.

Anyway, if you’re the type of person who doesn’t like that, doesn’t like the way that looks, think that looks foolish, I have a user voice item that you can vote on. You can express your contempt and disdain for the current state of sorting parallel threads above 9, I guess, in SQL Server Management Studio.

And the link will be attached to the YouTube video and probably in the blog post as well. I just haven’t written it yet, but it’s there. So, watch out for that. Vote for it. Help me make SQL Server Management Studio a nicer place to live and do business.

Sorry, I can’t stop staring at this wine stopper. It’s like the neatest contraption. I bet that like… I could just order these from like a restaurant wholesale place. I bet it’s not even like some extra fancy thing.

I’m probably… It’s probably overblown just because it has a fancy restaurant name etched in the top. Anyway, I’m gonna go get back to enjoying the smell of this champagne on yet another rainy day. Thank you for watching. Thank you for hopefully voting on this issue.

And hopefully, democracy will win and we’ll get this whole sorting thing straightened out. Have a nice day.

Going Further


If this is the kind of SQL Server stuff you love learning about, you’ll love my training. Blog readers get 25% off the Everything Bundle — over 100 hours of performance tuning content. Need hands-on help? I offer consulting engagements from targeted investigations to ongoing retainers. Want a quick sanity check before committing to a full engagement? Schedule a call — no commitment required.



3 thoughts on “Sort Thread Numbers Correctly in SSMS Operator Properties

  1. Easily explained – they’re sorting the strings “Thread 0”, “Thread 1″… “Thread 10”, “Thread 11” alphabetically/lexically. Betcha 100 query bucks that if you get something with over 20 threads that you’ll see “Thread 19”, “Thread 2”, “Thread 20”, “Thread 21”.

Comments are closed.