Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Server Should I reindex after Truncate Table? 1

Status
Not open for further replies.

mit99mh

Programmer
Sep 24, 2002
246
GB
I've inherited a DTS package that populates a table with close to 1 million rows. The table has a clustered index and several non-clustered indexes. The DTS package issues a truncate table comand and then data is copied into the table with a SELECT. Should I then re-index or as the data is copied in are the indexes updated?

Any help much appreciated.
 
No, just update statistics.

- Paul
10qkyfp.gif

- If at first you don't succeed, find out if the loser gets anything.
 
The indexes will be updates as the new data is written.

As Paul said doing an update stats would be a good idea after the data load is complete before you start using the table for anything.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top