How does a Left Join affect an Inner Join

By Greg No comments

Knowing the difference between join types is a very important part of querying a database. The two main joins that I use each day are INNER and LEFT. INNER join means get me everything from table A that has a matching row in table B. LEFT means get me everything from table A and if […]

Ubiquiti Amplifi Router

By Greg No comments

I have been using Linksys routers for years, since my first router, a WRT54G purchased off eBay. So when my most recent router started to die, it was time to look for a replacement and I naturally went to look at the new Linksys routers again.

Using OPTION (RECOMPILE)

By Greg No comments

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.

Adding Toast Messages to WPF Apps

By Greg No comments

As part of my job, I maintain a c# WPF app that we run on developers desktops.  This app does things in the background for a while and if you have the app open then you get some feedback on where it is up to. But if you don’t have it open in front of […]

CDC breaks after patching

By Greg No comments

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 […]

When Else Should Use Explicit Transactions for Single Statements

By Greg No comments

Kendra Little over at SQL Workbooks recently answered the question “When should I use explicit transactions for single statements?” I’m not going to re-hash what Kendra wrote, go and read it on her site. What I want to do is add another case for when I use explicit transactions for a single statement. Firstly, what is an […]

Set READ_COMMITTED_SNAPSHOT Isolation Level in Database Project

By Greg No comments

A current project I’m working on has it’s database stored in Source Control (you should be using source control) using a Visual Studio .sqlproj file. Visual Studio is able to generate a SQL script to update the database to make the objects the same as what is in Source Control. One of the things it […]

What is Cross Apply and Outer Apply

By Greg No comments

A few years ago I needed to join a table to the result of a table-value function and came across Cross Apply. Cross Apply and Outer Apply were introduced back in SQL 2005.

Integer Types

By Greg No comments

There are many different ways to store integers in SQL, how do you know which is the best?

SQL 2017 Release Announced

By Greg 2 comments

At Microsoft Ignite today, the SQL 2017 release date was finally announced for a week from now, on October 2. SQL 2017 is exciting because of the new Linux and Docker capabilities. Docker in particular will be an interesting one to see, particularly for dev/test environments where the ability to spin up and throw away […]