Skip to content
Home » Learn » SQL Server Database Development » Page 2

SQL Server Database Development

Filtered Indexes with TRY_CONVERT, ISNUMERIC, and other complex expressions

Who doesn’t like Filtered Indexes, am I right? They’re pretty great, honestly. If… of course… you’re able to actually create them and utilize them in your specific use cases. That… unfortunately, could often become a complicated, if near impossible, task. So, what if our use case is not trivial enough to allow for filtered indexes?

Read More »Filtered Indexes with TRY_CONVERT, ISNUMERIC, and other complex expressions

Finding a use for Extended Properties in SQL Server

“Extended properties allow you to add custom properties to database objects”, so says the official Microsoft documentation. However, very few DBAs make use of them, if at all. This is actually a good thing, because indeed the scenarios in which this feature could be useful are relatively few and rare.

On the other hand, I also see DBAs essentially jumping through hoops to implement something, which could in fact very easily be implemented using Extended Properties.

What are these peculiar use cases? Let’s look at a few examples.

Read More »Finding a use for Extended Properties in SQL Server

The Asynchronous Ledger Trick for Fast SQL Server Insert, Update and Delete Processes

Do you find yourself facing performance problems and long lock chains caused by very frequent INSERT, UPDATE, or DELETE statements being executed on a table? Check out this neat trick that could help you out and make all the difference in the world.

Read More »The Asynchronous Ledger Trick for Fast SQL Server Insert, Update and Delete Processes

Even more fun with DATETIME arithmetics!

In one of my previous posts, Fun with DATETIME Arithmetics, I introduced a way to use “math” to manipulate datetime values for effectively generating, calculating, and displaying intervals (i.e. difference between two datetime values). These mostly work with the addition and subtraction operators (+, -).

In one of the paragraphs, I mentioned multiplication and division, and posed the question about why anyone would ever need to do this.

Read More »Even more fun with DATETIME arithmetics!

Access Violation error when querying from a system table function with parallelism

Following an incident at a customer’s production environment, Nathan Lifshes and I realized that we stumbled upon a yet-unknown bug in SQL Server, causing an access violation error, memory dumps, dropped connections, and even cluster fail-overs.

Read More »Access Violation error when querying from a system table function with parallelism

T-SQL Tuesday #131 – Star Trek Candy and SWITCH TO

This month’s #tsql2sday came to us from Rob Volk (b|t), who asks us to explain databases using an analogy, as if explaining to a 5 year old. I’m actually a big fan of The Feynman Technique (aka ELI5), so I really wanted to participate. But to be honest, I nearly missed out this time simply because I couldn’t think of an idea this whole week.

On the very last day, when the posts already started rolling out by all the bloggers, I’ve read a few, and only then the muse finally hit me. I kid you not, the time is literally 23:59 here in Israel as I hit the publish button!

So anyways, the idea I had was for the ALTER TABLE..SWITCH TO command in SQL Server.

Read More »T-SQL Tuesday #131 – Star Trek Candy and SWITCH TO