Category: Blog

  • Au Revoir for now

    No, I’m not quitting or retiring. Just going on vacation, but I leave tonight for Brussels and this is my last day at work for a couple of weeks. My wife will try to catch my daughter between classes tomorrow before we fly to Rome for a 10 day cruise. We’ll also stop back in Brussels for a day with the kid to see how she’s loving European life.

    I have rarely disappeared for more than a week from work, and this will be an interesting test for me. It’s not a planned sabbatical, but rather a long vacation, one I’ve been looking forward to for months.

    Don’t break anything while I’ve gone.

  • The SUM of Nothing: #SQLNewBlogger

    I caught this interesting item over on Pinal Dave’s blog: Eleven Interview Questions that Look Too Easy. I decided to give you a few thoughts from me on the SUM one.

    Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers.

    The Sum of Nothing

    I am guessing more people working with SQL know that if you have a NULL in your data and try to sum the column, you get the NULL ignore. After all, you can’t sum up values if one is unknown. The code and query below show this:

    2026-09_0133

    Note, with ANSI_WARNINGS I get a note in the Messages tab:

    2026-09_0134

    However, what if there are no rows? Would you expect a 0, because if there isn’t any data, the sum is zero, correct?

    No.

    2026-09_0136

    Why? The docs don’t mention this (I’ve added a PR).  The ANSI standard notes that if all values are NULL or the set is empty, NULL is returned.

    Most of us don’t query empty tables, but we could get an empty set. Remember, the column list, and therefore aggregate, is evaluated after the WHERE and JOIN clauses. Therefore, as you see below, I could get a NULL in a sum where I expect data.

    2026-09_0135

    Make sure you account for this in your queries.

    SQL New Blogger

    I read reading another blog (Pinal’s) and realized this was interesting. I thought about if I’d have a problem and realized that I could because I’ve often assumed there is some data, but if I let users filter data from an app, I could return NULL.

    Easy to write, about 15 minutes to setup and do. You could do this.

  • Architecting Zero Downtime Deployments–Day of Data Boston

    Here are the resources for my talk at Day of Data Boston.

    Slides – ArchitectingZeroDowntime.pptx Slides also at: https://dayofdata.org/2026-10-03-dayofdata1150/#schedule

    Code: https://github.com/way0utwest/ZeroDowntime

    Book: Refactoring Databases

    Some interesting questions. I’ll write more, but a couple of quick answers as I breakfast at Logan.

    How do I handle expanding a column? Making it larger?

    This is platform and change dependent. For example, if you are expanding a varchar() column from 10 to 20, this is usually a metadata operation in MSSQL. No data gets touched, no rows, the system tables record a new size. This can be instantaneous. There are exceptions where this might take time, but usually this works.

    Changing from int to Bigint is different, but I’d follow the split columns pattern and add a new column instead, move data, then drop the old one.

    How do I get my organization to adopt better patters?

    This deserves a longer answer, but there are two parts: technical and politicial. The technical part is teaching other developers the new patters, using linting to catch issues, and convincing others this isn’t hard and works well.

    The political part is getting management to support/enforce this. That can be tricky, but you need to provide business reasons why downtime is a problem and how this addresses the issues, with real numbers: time down, cost savings, revenue lost, etc.

  • The Book of Redgate:A Prehistory

    I’ve covered the values in a number of previous posts on the Book of Redgate. Those values came from our founders, Simon Galbraith and Neil Davidson. I am lucky enough, and honored to have known these gentlemen for many years and had the chance to sit and chat with them throughout my time at Redgate. Simon and I still get together periodically even today after 25 years.

    In the Book of Redgate, there’s a section about prehistory. In it, there’s this picture and text. Neil and Simon have known each other since they were sixteen, starting a business together after they spent time at university.

    2026-07_0415

    Neil stepped away from the company many years ago, for a variety of reasons, and he remained on the board for many years. Simon continued as CEO for a long time and stepped down right after the pandemic. He remains on the board today.

    The thing that caught my eye is that they worked together from their 20s until their 40s. I still remember their joint 40th birthday party at the old Redgate office. How many people have you worked with for 20 years?

    How many of you have worked for an organization for 20 years?

    I guess I’ve worked for SQL Server Central for 25 years, but only some of those were me working for myself. I’ve been with Redgate almost 20 years as a contractor and employee, but I haven’t spent 20 years with anyone outside of my family and Andy Warren.

    He and I still talk most weeks, even though we’re not in business together anymore.

    Redgate has remained a strong brand and presence in my life and that of many others. Part of that is the longevity of so many employees. We’ve had some ups and downs, but relatively few turnover over the years. More recently, especially in sales, but there are a lot of people who have worked there for more than 10 years.

    That’s still amazing to me.

    I have a copy of the Book of Redgate from 2010. This was a book we produced internally about the company after 10 years in existence. At that time, I’d been there for about 3 years, and it was interesting to learn a some things about the company. This series of posts looks back at the Book of Redgate 15 years later.