Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

Reuilding the index. Expand / Collapse
Posted Tuesday, January 1, 2013 11:58 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, March 22, 2016 5:42 AM
Points: 298, Visits: 797
I am a newbie.I am learning SQL Server through the articles present on internet. I am a bit confused regarding Rebuilding the indexes.

On technet i came across a article were the author mention that we can rebuild the indexes by using Rebuild Command.

Then on the other article i came across the article which tells me that we have to execute a very long query to rebuild the indexes.

When we can rebuild the indexes using simple command as rebuild why do we need such long queries to do the task of rebuilding.

And another question is how to find out the index fragmentation.
Post #1401672
Posted Wednesday, January 2, 2013 2:11 AM



Group: General Forum Members
Last Login: Saturday, December 3, 2016 5:18 AM
Points: 45,619, Visits: 44,147
REbuilding indexes is done with ALTER INDEX ... REBUILD. That's all that's needed.

Was the long query not to identify which indexes needed rebuilding perhaps?

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

Post #1401699
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse