I am using Ola's INDEX Maintenance solution. Few indexes are not being re-organised after running job.Below is my code
EXECUTE dbo.IndexOptimize
@Databases = 'USER_DATABASES',
@FragmentationLow = NULL,
@FragmentationMedium =
'INDEX_REORGANIZE,INDEX_REBUILD_ONLINE,INDEX_REBUILD_OFFLINE',
@FragmentationHigh = 'INDEX_REBUILD_ONLINE,INDEX_REBUILD_OFFLINE',
@FragmentationLevel1 = 5,
@FragmentationLevel2 = 30,
@UpdateStatistics = 'ALL',
@OnlyModifiedStatistics = 'Y',
@LogToTable = 'Y',
@PageCountLevel = 0
Few indexes which has fragmentation level 27 % still doesn't get re-organised even after running Index-optimize job.
I have went through frequently asked questions, it suggests about pagecountlevel which is already 0 in my case.
Also it has index_id =1 rather than 0.
Best Answer
My guess is that these indexes are very small.
Aaron Bertrand comments here
Additonally, Thomas Stringer comments here