Index

  • hi,

    my table has 1 primary clustered key and 2 non clustered key.Now i want to rebuild cluster key,do i need to drop non clustered keys and rebuild ,or juts build without doing anything.

    Please explain.

    Thanks

  • You don't have to drop the NCs to rebuild a CI.

    Jared
    CE - Microsoft

  • Just rebuild the clustered index, there's no need to drop anything and having the nonclustered indexes won't make the clustered index rebuild longer or make it do more.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • hi

    how to rebuild clustered index.any command

  • Open up Books Online (the SQL help file/manual) and read over the page ALTER INDEX

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • shah.simmy (2/15/2012)


    my table has 1 primary clustered key and 2 non clustered key.Now i want to rebuild cluster key,do i need to drop non clustered keys and rebuild ,or juts build without doing anything.

    Is it a PRIMARY KEY or a UNIQUE CLUSTERED INDEX? Are you changing the keys? Might help if you provide the table and index creation scripts, and a detailed explanation of what you want to do, and why.

Viewing 6 posts - 1 through 5 (of 5 total)

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