Whats the best way to rebuild both cluster and non cluster indexes

  • Gurus,

    If I use the following command, Does it rebuild all cluster and non cluster indexes on the table ?

    USE AdventureWorks;

    GO

    ALTER INDEX ALL ON Production.Product REBUILD

    GO

    If not what the best command to rebuild all cluster and non cluster indexes on a table ?

    Thanks for great help.

    Bond

  • Per Books Online

    ALL

    Specifies all indexes associated with the table or view regardless of the index type. Specifying ALL causes the statement to fail if one or more indexes are in an offline or read-only filegroup or the specified operation is not allowed on one or more index types.

    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

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

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