Dropping Clustered Index

  • Hi,

    I'm trying to drop a CS Index and recreate it but it's taking a long time to do this. There are 15000 rows in table. I would have thought that it will be done very quickly and I have checked that this table isn't being accessed at all.

    Thanks

    T

  • It may take a while, especially if there are nonclustered indexes.

    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
  • Try below steps,

    1. Store table data into a temp table.

    2. Truncate table.

    3. Drop Clustered Index.

    4. Reload data from temp table.

    5. Re-create Clustered Index.

    Hope it works for you!

    Regards,

    SMK

    --------------------------------------------------------------------------------------

    "If you’re not prepared to be wrong, you’ll never come up with anything original."

    --------------------------------------------------------------------------------------

    Regards,
    SMK

    --------------------------------------------------------------------------
    "If you’re not prepared to be wrong, you’ll never come up with anything original."

  • It depends on size of the data too!

    ---------------------------------------------------
    "Thare are only 10 types of people in the world:
    Those who understand binary, and those who don't."

  • It also depends on number\size of columns .

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

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

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