Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Index rebuild/drop recreate

Author  Topic 

stranter
Starting Member

17 Posts

Posted - 2010-09-30 : 10:47:29
Hello,

All of our systems run, on a daily basis, in the following way:

1) Source system generates file
2) Tables are druncated in SQL server
3) Data is imported from text file via DTS
4) Some updates misc. processing happens
5) Data is ready

Currently our indexes are rebuilt once a week using a maintenance plan.

I suppose my first question is this: Once the table has been truncated and the data (exisiting, plus new/changed data) inserted via DTS are, as I suspect, the indexes redundant?

If so, would it be better to to the following instead:

1) Source system generates file
2) Tables are truncated in SQL server
3) Data is imported from text file via DTS
4) Rebuild/drop and recreate indexes
5) Some updates misc. processing happens
6) Data is ready

If the above is a good idea, is it best to drop and recreate or rebuild the indexes?

Thanks,

Stewart

Stewart

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-09-30 : 13:41:55
How big is the data import? Typically for a process like this, people will drop the indexes before the import and then add them back after the import. This method will speed up the import.

I don't know what you mean by the indexes being redundant.

If you don't drop/create like I mentioned, then yes you should rebuild them. I'd recommend drop/create for your process though since you are using truncate.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -