Table partition and index rebuild

  • Hi Team,

    I have partitioned tables and associated schema bound views with clustered indexes.

    I have rebuild cluster indexes on tables(not on views) for particular fragmentation.

    alter index ind_name on table partition_id=x

    will that affect my table partitioning?

    I have facing issues while rebuilding indexes on views. It is taking longer time than usual.

    Pls help.

  • hi,

    I'm not sure what your question is. Maybe some useful hints:

    "alter index" used with a specific partition_number does exactly that: it rebuildes the index(es) on that partition only.

    If, for some reason, you think performance is bad afterwards try to use the maxdop=1 option.

    If index rebuilds are done in parallel the index has little fragmentation afterwards, as each processor writes is own block of data seperately back to disk. When using maxdop=1 all the data is written as one block.

    (this explanation maybe simpliefied and not correct for real database gurus, i know....)

    This difference in rebuilding can cause high performance impact.

    Also, think about your view, you will have to rebuild/reorganize the clustered index there too.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply