Reorg job updating stats #592
Replies: 1 comment 2 replies
-
I would suggest commenting out or removing the parameter @UpdateStatistics. I can't remember exactly where I read it, but I created a separate job to update statistics for better control. You can try the following. If you want to test you can change @LogToTable and @execute to 'N' to see what will be executed. -- Indexes Only |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,

We are using your reorg/reindex jobs in production. I have the following set up, which I believe means it would not update stats, however in the commandlog table I'm seeing a rebuild of the index immediately following the reorg of the index, screen shot attached. Am I misunderstanding the use of the word NULL on update stats?
EXECUTE [dbo].[IndexOptimize]
@databases = 'DATABASENAME',
@indexes = 'DATABASENAME.dbo.%',
@LogToTable = 'Y',
@LOBCompaction = 'N',
@FragmentationMedium = 'INDEX_REORGANIZE',
@FragmentationHigh = NULL,
@UpdateStatistics = NULL
Beta Was this translation helpful? Give feedback.
All reactions