This week, I was trying to improve the performance of a bit of SQL and noticed that it generated significantly different query plans depending on the parameters passed in. So I tried to work out how to make it run well for all scenarios.When SQL Server first runs a stored procedure, it works out the... Continue Reading →

CDC breaks after patching

I recently patched some servers from SQL 2014 SP2 CU3 all the way up to CU10. The patching went fine, everything came back online and looked to be working perfectly. However, the next day I realised that the CDC Collection Job was not running. After much googling and trying to rebuild the collection job, I... Continue Reading →

Integer Types

There are many different ways to store integers in SQL, how do you know which is the best? I have worked in organisations where it was decided that BIGINT should always be used for primary keys, because then we'd never run out of numbers. While the argument was true, they wouldn't run out of numbers,... Continue Reading →

Create a website or blog at

Up ↑