T-SQL

Natural Born Killers (The series) – Day 7 Table Variables vs Temp Tables

Natural Born Killers (The series) – Day 7 Table Variables vs Temp Tables

To those that don’t know me “Natural Born Killers (The Series)” sounds like a very strange choice for a SQL Server blog title and to be fair it is. Those who do know me, will know that I have been presenting a session this year titled “Natural Born Killers, performance issues to avoid” around the […]

T-SQL Tuesday 23 – Key Lookups

T-SQL Tuesday 23 – Key Lookups

This post is brought to you by the letter “K”. Those of you that have been following my blog and tweets recently will know all about the SQLRelay event that is happening in the UK this week. Tonight is the second of a four night series of events culminating on the 6th October in London […]

Identifying Query Plans that are not good enough

Identifying Query Plans that are not good enough

After doing my usual daily checks I noticed that I had an unread blog entry – Reason for Early Termination of Statement by Grant Fritchey (Blog|Twitter) in my RSS Feeds, Grant’s posts are always very good so I put a few moments aside to take a look through and I’m glad that I did!

Building Queries, work smarter not harder

Recently I asked a colleague to split up an update statement into smaller batches to reduce locking on the system and the impact on replication, the table in question did not have an identity attribute on it so it had to be segmented a little more manually and he was worried that it would result in a lot of code to write. Now it’s true we could have used NTILE or TOP statements in a loop and split the update statement down that way, but then I wouldn’t have been able to talk about how you can work smarter not harder when it comes to building repeated queries.

Sharing scripts

Most if not all SQL professionals will have heard of SQLServerCentral.com, if you haven’t it’s a great community site with it’s own SQL Server forum where you can ask questions and receive answers from your peers. The site has a contribution center feature where registered members can submit articles, scripts and even a “Question of the day”. In true community spirit I shared one of the scripts that I had been working on.

Finding Files: Part 1 T-SQL

Richard Douglas shows how you could use the undocumented stored procedure xp_FileExists to start another process.