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

Disable index

Status
Not open for further replies.

mghafoori

Programmer
Feb 7, 2002
16
0
0
US
I need to load about 1 million rows into a table that is indexed. I know you need to disable the index before the insert in order to speed the process. Currently, I drop the indexes and recreate them after loading. Is there a disable/enable index command. I found "Alter table disable Constraint", but that only works for primary key or foreign key. Any help is appreciated
 
Hi,

I've been doing the same thing as you, loading lots of data, but there's no enable/disable command, just drop and recreate the index via script.

Is there another way I haven't read it on a forum or book...

Take care


 
You know guys, your indexes will work better if you recreate them after you load the tables...

Have you tried using hints?
 
There is no DISABLE/ENABLE commands for indicies. The only one way to do that is to drop and rebuilt the indicies.

Hope that helps,

clio_usa - OCP DBA
------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top