Is there any reason to stop transaction log backups during a maintenance window?

You are absolutely correct. There is no reason to stop Transaction log backup during index maintenance window. It will only make things worse as you already experienced. I had cases where I was doing maintenance on smaller size indexes I even took transaction log backup more frequently than my regular schedule.

In case if you are rebuilding large indexes you need to make sure that you have enough storage for transaction log to grow. Even you take transaction log backup during index rebuild logs will not be truncated when you have a long and active transaction. That is not the case when you reorganize indexes because logs can be truncated in between while reorganizing a single index.

Even in the Frequently Asked Questions page of Ola Hallengren this is mentioned:

The transaction log is growing very large when I run the IndexOptimize job. What should I do?

Make sure that the transaction log backup job is running as it should.

Check that the transaction log has the storage that it needs. You should not shrink the transaction log file. Doing so costs resources to shrink and later to regrow the file.

During full backup there is no need to stop transaction log backup. Read this article by By Erik Darling.

What happens to transaction log backups during full backups?


SqlWorldWide is right, but I'd take a step even further back and ask: Is defragmenting your indexes even helping anything?

There's a pretty big placebo effect for folks who rebuild indexes: they also update statistics. The updated stats give El Optimizero a better description of the data in your indexes, and may even chase a bad or inefficient query plan out of cache.

Most folks run Ola's script with the defaults. The problem there is that Microsoft published that guidance around the same time Windows Server 2003 was born. Computer hardware has come a long way since then. If your server still has a bunch of drives with rotating platters, it's time to start working on getting off that thing.

A more sensible way to run Ola's scripts, if you're on Enterprise Edition, is like this:

EXEC master.dbo.IndexOptimize @Databases = 'USER_DATABASES',
                              @FragmentationMedium = 'INDEX_REORGANIZE',
                              @FragmentationHigh = 'INDEX_REBUILD_ONLINE,INDEX_REORGANIZE',
                              @FragmentationLevel1 = 50,
                              @FragmentationLevel2 = 80,
                              @MinNumberOfPages= 5000,
                              @UpdateStatistics = 'ALL',
                              @OnlyModifiedStatistics = 'Y',
                              @LogToTable = 'Y';

If you're on Standard Edition, you can't Rebuild Online, so you could use this:

EXEC master.dbo.IndexOptimize @Databases = 'USER_DATABASES',
                              @FragmentationMedium = 'INDEX_REORGANIZE',
                              @FragmentationHigh = 'INDEX_REBUILD_OFFLINE,INDEX_REORGANIZE',
                              @FragmentationLevel1 = 50,
                              @FragmentationLevel2 = 80,
                              @MinNumberOfPages = 5000,
                              @UpdateStatistics = 'ALL',
                              @OnlyModifiedStatistics = 'Y',
                              @LogToTable = 'Y';

What do these buy you?

  1. Only working on indexes that have a fragmentation level that could start to show for larger scans
  2. Only working on indexes of a size where defragmenting them reduces the number of pages you'd have to read by a significant size
  3. Taking care of your modified statistics

If you start running maintenance with those settings, and no one fusses, you can switch from running them nightly to weekly. Or even monthly.

You're still going to want to update stats regularly though, and you can do that with this command:

EXECUTE dbo.IndexOptimize @Databases = 'USER_DATABASES',
                          @FragmentationLow = NULL,
                          @FragmentationMedium = NULL,
                          @FragmentationHigh = NULL,
                          @UpdateStatistics = 'ALL',
                          @OnlyModifiedStatistics = 'Y',
                          @StatisticsSample = NULL,
                          @LogToTable = 'Y';

Index maintenance is both annoying and confusing -- I used to be pretty stupid about it. Once I got over the OCD need to keep indexes as unfragmented as possible and started concentrating on things that actually helped performance, my servers were in much better shape. I also had a lot more time for important things, like DBCC CHECKDB.

Hope this helps!