Categories
SSIS

Wrestling with Temp Tables in SSIS Data Sources

When handing data we can make use of temporary tables to aid with separation or performance. However, they don’t always play nice with Integration Services packages. If we set a source to call a procedure returning the contents of a temporary table we’ll see an error like below: The process is unable to determine the […]

Categories
SQL

Adding NOT NULL Columns. Fast.

When adding a new column and wanting to default the value for existing records, it used to be a painful task. As of SQL Server 2012 that became much easier. But nobody told me, until Simon casually mentioned it in conversation recently. I had to see it for myself, so I thought I’d share for those who […]

Categories
T-SQL Tuesday

T-SQL Tuesday #180: Good Enough is Perfect

This month, Josephine has asked how we achieve good enough without burning out in the pursuit of perfect. When designing data solutions, aiming for perfection can lead to endless iterations, moving targets, delays, and – as Josephine points out – burnout. A quote which encapsulates the essence of this for me: Perfection is the enemy of progress Winston Churchill If […]

Categories
SQL

Why Bother Indexing Foreign Key Columns?

Last week I shared a script to identify foreign keys which weren’t indexed. What we didn’t discuss in detail was why it can be important to index these columns. Here we’ll demonstrate the two areas we can see great benefits by introducing the indexes. Query optimisation We’ll start with the typical benefit of indexing – query optimisation. The index […]