AzureSQL icon indicating copy to clipboard operation
AzureSQL copied to clipboard

Columnstore index are not rebuilding

Open Nimrodsv opened this issue 5 years ago • 4 comments

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!

Nimrodsv avatar Sep 09 '19 13:09 Nimrodsv

@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'
    )

dandenton avatar May 21 '20 16:05 dandenton

@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 avatar Sep 16 '20 13:09 yochananrachamim

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

yochananrachamim avatar Nov 09 '20 10:11 yochananrachamim

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

marcosikkens avatar Sep 01 '21 08:09 marcosikkens