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
 Transact-SQL (2000)
 Bulk Insert Issue

Author  Topic 

sqllearner
Aged Yak Warrior

639 Posts

Posted - 2006-10-26 : 02:56:14
I am doing a bulk insert (Its a record by record process but the volume is veru high)to 30 tables which is relation database.Since the volume of data is very high.Can we switch off all the indexes and recreate it after the refresh is completed to increase the performace.

But I want all the identity columns to remain as it is as well.

sqllearner
Aged Yak Warrior

639 Posts

Posted - 2006-10-26 : 03:03:10
Can I use something like this :
Drop and Recreate the Index
Recreate the Index with the DROP_EXISTING clause
Execute DBCC DBREINDEX
Execute DBCC INDEXDEFRAG
Will this do for the entire database :
Another thing I need to switch off all the constraints as well to increase performace.Is that possible from a database level and then switch on the constraints
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-10-26 : 03:11:03
"Another thing I need to switch off all the constraints as well to increase performace"
By default constraints are ingored in Bulk Insert


KH

Go to Top of Page

sqllearner
Aged Yak Warrior

639 Posts

Posted - 2006-10-26 : 03:15:09
No this is a record by record process the only thing is that the volume is very high so its taking long time to finish processing.So one of the solution we thought of is to switch off all the indexes and then execute the refresh process once its done we want to switch it back to the original state.

This is one time task.After that the volume is very less.So its managable
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-10-26 : 03:20:26
What do you mean by "a record by record process" ?

Bulk Insert copies a data file into a database table.



KH

Go to Top of Page

sqllearner
Aged Yak Warrior

639 Posts

Posted - 2006-10-26 : 03:28:55
When I meant bulk its not a bulk insert its the number of records I have to process.
The volume is very high and the requirement is to process one by one.Now I have the challenge of going through all the constraints and indexes on the realtional database.Can I some how switch off at the time of processing it and then switch on after the processing is done.So that one time migration is done.
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-10-26 : 03:52:06
Yes. You can drop and create the index and the constraints as well.

How do you insert the records into the tables ?


KH

Go to Top of Page
   

- Advertisement -