I have some databases in different servers and found the fragmentation numbers are over 90% on the indexes in some tables. Then, the job with master database stored procedure:
to "EXECUTE [dbo].[IndexOptimize] @Databases = '(my each database name)', @Indexes = '(my each index name)', @FragmentationLow =NULL, , @FragmentationMedium = 'INDEX_REORGANIZE,INDEX_REBUILD_ONLINE', @FragmentationHigh = 'INDEX_REORGANIZE,INDEX_REBUILD_ONLINE', @FragmentationLevel1 = 5, @FragmentationLevel2 = 30 , @LogToTable = 'Y' "
was setup and runs successfully. This stored procedure works on some indexes, the fragmentation numbers were down. But, some indexes still have >90% fragmentation.
Why this stored procedure works on some indexes and some doesn't work? Is there other way to bring Fragmentation down?