tigertoolbox
tigertoolbox copied to clipboard
AdaptiveIndexDefrag only works on index_id = 1?
I am just trying out the AdaptiveIndexDefrag. On two tables, I had significant fragmentation (exceeding well over 30%) in the primary key, but also on other indexes.
After running AdaptiveIndexDefrag (multiple times), the fragmentation of the PK in one table is 0, on the other it's still 50. However, none of the other indexes were touched.
I've tried several different options, the latest one this:
EXEC [dbo].[usp_AdaptiveIndexDefrag] @dbScope = 'mydb', @printCmds = 1
, @onlineRebuild = 1, @statsSample = 'FULLSCAN'
PS: This is on an Azure SQL DB.