yochananrachamim / AzureSQL

129 stars 61 forks source link

Indexes maintenance process indexes with 0 pages as well #17

Closed yochananrachamim closed 3 years ago

yochananrachamim commented 3 years ago

I am running procedure with the smart option, and the log table on and I can see that process is doing an alter index rebuild on an index that fragmentation is 0% with 0 pages. Why is it doing that? Can I disable this somewhere in proc?

Capture3

yochananrachamim commented 3 years ago

Fixed. the same as with statistics we used the wrong condition to check if index need to be maintained. this is due to change in behavior from checking which need to be maintained to indexes that does not need to be maintained.