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 dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drop Index

Status
Not open for further replies.

GrandMauler

Programmer
May 16, 2007
74
US
Is there a way to drop all the indices on a table without having to specifically name them?

This an MSSQL 2000 question.
 
Actually, Id like to change this question to:

I have a table that I'd like to suspend the indexing until after I import a large amount of data to. Is there a way to turn the indexing off, import the data, then refresh the index?
 
generally I script the indexes and then use the statements created in the scripts to drop the indexes and the recreate them afterward.

Questions about posting. See faq183-874
 
you probably wouldn't want to drop the clustered index, though, would you?

I've had cases where inserting with the clustered index in place took far less time than trying to add it afterward (table had millions of rows)

[COLOR=#aa88aa black]Cum catapultae proscriptae erunt tum soli proscript catapultas habebunt.[/color]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top