Index Maintenance Can Change NORECOMPUTE Settings

I had a customer recently ask about a change in one of their constraints on production, where a new option appeared when they went to deploy some changes from QA. They asked how this could happen, and I’ll show how in this post.

Suppose I create a table like this in a development environment.

CREATE TABLE [dbo].[Logger](
     [LogID] [INT] NOT NULL CONSTRAINT LoggerPK PRIMARY KEY,
     [LogDate] [DATETIME] NULL,
     [LogMsg] [VARCHAR](2000) NULL
     )
GO

I (hopefully) have a process to get this to production (version control, automation, etc.). Once in production, if I were to script this on SQL Server 2022, I’d get this from SMO.

CREATE TABLE [dbo].[Logger](
     [LogID] [INT] NOT NULL,
     [LogDate] [DATETIME] NULL,
     [LogMsg] [VARCHAR](2000) NULL,
  CONSTRAINT [LoggerPK] PRIMARY KEY CLUSTERED
(
     [LogID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO

This looks different, but really this includes the defaults that existed in dev, and also in production. Hopefully all my SETtings and configuration is the same, to ensure no surprises.

Now, let’s imagine a DBA has some index maintenance, perhaps Ola’s scripts or some other script that works through all tables and indexes. If a DBA decides they’d like to edit the script to change a setting, they might end up running this code for my Logger table:

ALTER INDEX ALL ON dbo.logger
REBUILD WITH (FILLFACTOR = 80, SORT_IN_TEMPDB = ON, STATISTICS_NORECOMPUTE = ON);

There’s a small change in here from the defaults, which I’d see if I were to run a SQL Compare comparison. Now I’d see this type of change, which might not be a problem, but it might be an issue where each deployment wants to reset this setting.

2025-04_0139

If you don’t think this is a big deal, here’s the deployment code:

2025-04_0140

I would not want this going through my deployments. And it might if our team were no diligent in looking at the deployment script.

Be explicit with defaults, and be careful about making changes in production. You might end up creating problems in your update process if you don’t feed these changes back to development.

Posted in Blog | Tagged , | Comments Off on Index Maintenance Can Change NORECOMPUTE Settings

Interview Tips

When is the last time you interviewed for a new position? It could have been at a new company, or maybe you had an interview was for a different position inside your existing company. Perhaps you needed to talk to a manager internally for a new project. I’ve tried to treat all my one-on-one meetings or reviews as interviews since I’m usually trying to impress someone enough to get a raise or promotion.

Preparing for something you do rarely is hard. Most of us have interviews very infrequently, and we often aren’t prepared to impress others. If your partner or a close friend is also a business person, perhaps they can help you get ready, but I’ve found that most people struggle to help others prepare as they don’t know how themselves.

I used to interview people periodically as part of my job. I spent time asking others how they evaluated others and reading up on how different companies do this. Over time, I built up a routine of how to run an interview, ask candidates probing questions, efficiently record notes, and evaluate my choices. I became good at running interviews. Not necessarily great at hiring people because that still felt hit and miss, but at least I had a process for evaluating others.

When I was looking for jobs, which happened a bunch in my late 20s/early 30s, I also had a process and I think I did well. I got offered positions after most of my interviews, which was a luxury since that often gave me a choice of where to work. I saw this post on Linked In with a list of questions and answers for a job interview. These are certainly the type of questions I’ve been asked before, and I’ve prepared for. While this aren’t bad answers, they aren’t enough.

Some of these might not be asked in internal interviews or reviews, but you ought to be able to give a short answer and then follow it up with an example from your career, give some details and practice delivering those smoothly. Know your own story, and don’t look like you’re fumbling for answers, trying to remember things you’ve done. It’s understandable that you might not remember details of some event from ten years ago, but it is also a sign you haven’t prepared for an interview.

Getting a job these days is about having some relevant experience, having good soft skills, and standing out from the pack of other people who are applying for the same job. Blogging helps showcase experience, practicing communication helps soft skills, and great stories of things you’ve done help you remain memorable when the interviewer is talking about all the candidates with their peers.

If you want a new and (hopefully) better job, put in some work and prepare.

Steve Jones

Listen to the podcast at Libsyn, Spotify, or iTunes.

Note, podcasts are only available for a limited time online.

Posted in Editorial | Tagged | Comments Off on Interview Tips

Speaking at SQL Saturday Austin 2025

SQL Saturday Austin 2025 is in just a few days. I am honored to be speaking there, and glad to be going back. I’ve missed a number of the Austin events with schedule conflicts, but things worked out well this year, and I’ll be at the event.

The schedule is out and it’s packed with some great sessions. I’ll be talking about zero downtime deployments, but there are some other nice ones:

  • MS Fabric and SQL from Bob Ward
  • AI for the data professional from Ginger Grant
  • SQL DBs in Fabric for Dashboards and Marts from Joey D’Antoni
  • Defending against Ransomware from Jeff Iannucci

and plenty more. I’m sad to miss Conor Cunningham’s talk, but we’re at the same time.

There’s also a Pre-con on Friday about Fabric if you want to attend. It’s a great chance to get very reasonable training at a low cost.

If you’re anywhere near Austin, some out this Saturday and join us for a great day of learning.

Now I’m off to pack as I leave tomorrow to head to the Redgate office in Austin for the rest of the week before the big event.

Posted in Blog | Tagged , , , | Comments Off on Speaking at SQL Saturday Austin 2025

Updating SSMS is Easy (w/ v21)

I’ve been using the SSMS preview for v21. This is the next evolution of SSMS, where the VS shell is finally being updated. For many of us, SSMS has been using an old version of the Visual Studio shell as its basis for development. It’s a locked down version, which is limited what’s possible in SSMS. Redgate and a few other companies have hacked in tools like SQL Prompt and SQL Source Control, but the number of extensions.

In any case, this post looks at the upgrade to preview 6. I was on 4 on this machine, and I noticed a message when (returned home and ) started SSMS.

2025-04_0095

Just like v19 and v20, this appears in the lower right corner. However, in this case, it’s showing a VS 2022 update.

When I click the update on close, and close SSMS, I see a UAC dialog and then the VS Installer. The download and install starts right away, in the same way that any VS update comes down.

2025-04_0130

When this finishes, no download, nothing for me to do, I see things updated.

2025-04_0133

And I’m updated. When I started, I got the question about testing the new connection dialog, which I agreed to, but forgot to screenshot. In any case, I can now do more testing with this new version to be sure it’s working well.

2025-04_0134

Posted in Blog | Tagged , | 4 Comments