AzureSQL
AzureSQL copied to clipboard
Columnstore index are not rebuilding
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!
@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'
)
@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.
for column store indexes you may use dummy mode at the moment - it will process them with reorganize.
Is there a reason why you didn't do a rebuild WITH (ONLINE = ON); For 2019 it then does an online rebuild.