Index Defrag and Rebuild index?

Last Post 18 Jul 2008 03:42 AM by SQLUSA. 1 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
ketan128
New Member
New Member

--
10 Jun 2008 07:42 AM
we have a heavily used table(19 million rows) on one of our production database.
This table has one clustered index and 2 more indexes. so this table has total 3 indexes.
i want to Defrag Index on that table and after this i also want to Rebuild index on that table
How can i do this on that table and which way?
Please help
Thanks in advance
SQLUSA
New Member
New Member

--
18 Jul 2008 03:42 AM
This is the syntax sample for REBUILD:

USE AdventureWorks;
GO
ALTER INDEX ALL ON Sales.SalesOrderDetail
REBUILD WITH (FILLFACTOR = 90, SORT_IN_TEMPDB = ON,
STATISTICS_NORECOMPUTE = ON);
GO

The FILLFACTOR requires some experimentation. If your table is really dynamic, you may want to try 80. Also dependant how frequnently are you reindexing.

Kalman Toth - Database, Data Warehouse & Business Intelligence Architect
SQL Server 2005 Training, SSAS, SSIS, SSRS: http://www.sqlusa.com/


Acceptable Use Policy
---