yochananrachamim / AzureSQL

129 stars 61 forks source link

Columnstore index are not rebuilding #8

Open Nimrodsv opened 5 years ago

Nimrodsv commented 5 years ago

Hi,

I'm running this maintanence procedure for quite a while already and i've noticed that it doesn't rebuild/reorganize columnstore indexes although they are very fragmanted.

Is it out of scope for this script?

Thanks!

dandenton commented 4 years ago

@yochananrachamim it looks like in the section with the comment Remove statistics if it is handled by index rebuild / reorginize the script removes stats that exist in #idxBefore but that includes all indexes, not just the ones that are being rebuilt. Should it include the same where clause and/or delete records from #idxBefore that aren't being updated?

where
    (
        page_count> @minPageCountForIndex and /* not small tables */
        avg_fragmentation_in_percent>=5
    )
  or
    (
        @mode ='dummy'
    )
yochananrachamim commented 4 years ago

@Nimrodsv - yes, at the moment this script is not being designed to handle columnstore indexes. @dandenton - you are absolutely right. can you please open another issue so I can fix it in the next cycle of development for this maintenance script.

Thank you.

yochananrachamim commented 3 years ago

for column store indexes you may use dummy mode at the moment - it will process them with reorganize.

marcosikkens commented 3 years ago

Is there a reason why you didn't do a rebuild WITH (ONLINE = ON); For 2019 it then does an online rebuild.