Parameter sniffing in User Defined Table Types

C# Development, Performance tuning
"We are not using User Defined Table Types anymore! They are bad for performance." This is what one of my coworkers told me last week. Whenever a person makes a statement like this, I first of all would like to know what made him/her say that. To me, a statement in the form of: "We do/don't do X, because it is bad/good" makes me think about religion. Religion is all about rules, and in IT, there are no rules. In IT, the credo is, and should be: "It depends". However, an issue at work has made me decide to move forward with this one. As most of you know, parameter sniffing can be one of the hardest problems to recognize. Most of the time, a parameter has a single value.…
Read More

The neverending story about Guids

C# Development, Performance tuning, Programming, SQL Server
Ok. So, today I came across a performance issue at work that might or might not have to do with the fact that we are using random Guids in a certain table. I decided to accelerate the post I was writing about this, so it could benefit me and my colleagues, and of course, you. In my days as a SQL Developer and DBA I have come across a lot of performance issues that were caused by these tiny little monsters. To explain, let's take a dive into the subject: SQL Server is a great database product with great performance. That is, when you know what (and why) you are doing. Of course, you all know a lot of that performance has to do with indexes, so you want your…
Read More