SSMS 18.5 – small change, huge effect!

The latest version of SSMS has just been released. Version 18.5. And I need all of you to update your version. Now. Yes, right now. Here’s a link to download it. I’ll wait. Why the rush, you ask? Because hidden in between all the little (and some big) improvements and fixes, there is one true gem. One I wish Microsoft had done … oh, let’s say two decades ago? Misleading information If you have been to any of my talks about execution plan, you probably have heard me fuming about (and warning you for) the way estimated and actual number…
Read More

Announcing … the execution plan video training

In the past years, several people have suggested that I should make videos to help people get a better understand of execution plans. I’ve always shied away from the idea. Creating video content, or rather, creating top notch quality video content, takes a lot of time. Would it not make more sense to create more content for other channels? On the other hand, a lot of people learn more from live training, or from video training (the closest alternative), than from reading blogs or articles. And my goal is to educate as many people as possible. It’s impossible for me…
Read More

Stop the name-calling! … Execution plan terminology

7 Comments
It’s time. High time. Time to set the record straight on types of execution plans. There are some severe misconceptions, and they have many causes. One cause is many good folks, including myself, have in the past spread incorrect information. We were young, we didn’t know any better. But now we do, and we want to set the record straight. Another cause is terminology. Terms, originally chosen by Microsoft and then used by everyone else, suggested something not quite true. And we all fell for it, me included. But not anymore. It’s time to set the record straight. And to…
Read More

No I can!

Allow me to interrupt my normal technical posts to share a personal story. I can’t sing Starting in my early youth and continuing all through my adulthood, people have been telling me that I cannot sing. Classmates, colleagues, random people I met. But also people I trust and love. For example, my mother loves to talk about when my, my brother, and my sister were still young children and we used to have times when the us three and mum and dad would sit together and sing songs. She loves the memory, and one part of his we sang “polyphonic”…
Read More

Removing multiple patterns from a string

Recently one of my clients had a request that was a challenge to do effectively. I don’t think it’s a very common requirement but I still decided to blog about it. Who knows, maybe one of you will actually benefit. Pattern removal Within a existing query, one of the columns in the result set holds string data that includes sequences and patterns that need to be removed in the output. Most of those patterns can occur more than once, and then all of them need to be removed. Some of these patterns overlap with each other and then the longest…
Read More

T-SQL Tuesday #111: Why, tell me why

No Comments
Time flies. It feels like the new year has just started, and yet we’re already at the second T-SQL Tuesday of the year. Our host this February is Andy Leonard (b|t), and his assigned topic is, simply: Why? Or rather: What is your why? What motivates you, what makes you tick? And most of all: What makes you do the things you do? The Execution Plan Reference I do a lot of things. I have a one-person consultancy business, I have a wife and kids, I have a personal life with several hobbies, and I could talk about my motivation…
Read More

Plansplaining, part 10. Just passing through

No Comments
Welcome to part ten of the plansplaining series. Each of these posts takes an execution plan with an interesting pattern, and details exactly how that plan (or pattern) works. In this post we will look at a query and execution plan that may appear perfectly normal and unexpected at first sight, but that has some perhaps confusing execution counts. Sample query The sample query below will (as almost always) run in all versions of the AdventureWorks sample database. It returns a list of all staff, and for people that have a sales-related job title it adds the total of sales…
Read More

SQL injection

2 Comments
One of the many sites where I occasionally answer database-related (and sometimes other) questions is Quora – also known as “yet another question and answer site because we all know that what the world really needs is yet another question and answer site”. On that site (and probably many others), some topics just keep resurfacing. One of those “evergreen” topics is SQL injection. The questions on this topic are not all the same, but they all do fall into a few broad categories. So instead of repeating the same reply over and over again, I have decided to write a…
Read More

Collation change script

31 Comments
WARNING: The script presented in this post was for a specific situation at a specific client. It was not intended to be complete, and it is not actively maintained. Several people have suggested improvements in the comments, and Erland Sommarskog has written a long article where he presents a more refined version. Please check which version works best for you, and test with care! Normally when I blog, I spend a lot of time making sure that get as close to perfection as I can. This post is an exception. The problem I am talking about is too far out…
Read More

Off Topic: Charity and snooker

No Comments
So this will be a very unusual post for this blog. It will be completely off topic. One of the things I do in my spare time is to play snooker. Mind you, I am not good at the game. But I enjoy it, and it’s a nice break from sitting at my laptop. Marathon So why do I share this tidbit about my personal life? Why do I think anyone cares? The reason is that I need some help. Next month, on February 15 and 16, 2019, I am participating in a 24-hour snooker marathon. And with my participation…
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