Only Update Stats You Need
Produced: 12/09/2015 12:22:00
I’ve had a LOT of issues with stats over the years, mostly due to ascending keys, and I’m not the only one. However, the way in which I see people try to deal with these issues is quite interesting.

Obviously, nearly everyone simply updates stats, but it’s how they do this which can be crucial.

The most common method I see to deal with this is a simple “It’s table X, therefore we’ll update stats on table X”.

Okay, this will likely work, but it could be wasting a lot of time that you might not be able to afford.

Setting Trigger Order
Produced: 07/09/2015 12:19:00
This is something that comes up rarely, but when it does it can be a real pain.

I’ve seen situations in which you have multiple triggers on the same table and these Triggers could also be set to fire from the same action.

This can cause a lot of issues.

What happens if you want these Triggers to fire in a specific order? It might well be the case that if they fire in the wrong order then data could end up being incorrectly processed.

How Inserted and Deleted Tables Work
Produced: 02/09/2015 12:16:00
This is another post about Triggers, but in this one we’re going to focus more on the Inserted and Deleted tables that a Trigger has access to.

This will explain how they’re created and therefore how Triggers can cause unexpected issues when reading Execution Plans.

There are differences between the two types of Trigger when it comes to how these internal tables work. One being a lot more obvious than the other.

SQL Server Trigger Examples
Produced: 28/08/2015 12:15:00
As mentioned in my previous post, we have 2 types of Trigger available in SQL Server… AFTER and INSTEAD OF.

In this post I’m going to go through a few examples to show syntax and a couple of uses.

These examples will cover both types and also reference both the Inserted and Deleted tables that Triggers offer.

SQL Server Triggers
Produced: 23/08/2015 12:10:00
Triggers are kind of like stored procedures… they’re simply pieces of code that can execute based on another event… ie. They’re “triggered” by another event.

These triggers can perform follow-up events or they can actually replace the action that the user thinks is happening. The former is called an “AFTER” trigger and the latter an “INSTEAD OF” trigger.

1 of 43