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

Most efficient way to copy many rows between tables? 1

Status
Not open for further replies.

ookete

Programmer
Oct 5, 2004
180
US
I need to copy several million rows of data from a linked server into a database table. I am a little hesitant to just

INSERT INTO xxx (...)
SELECT (...)
FROM

Is this the best way? Are the Export/Import tools more efficient than the above simple query? What about Bulk Insert? I have never used that before.

Thanks for any advice!
 
Have a look at this faq, its probably the handiest



Alternatively you could import the data via SSIS, but the above method covers everything you should need to know.

Any questions just pop another note on,

cheers

"I'm living so far beyond my income that we may almost be said to be living apart
 
This is very useful, it should work well for me. Thanks!
 
Have you tried bcp? Do a help search on "Optimizing Bulk Copy Performance".

Ever notice how fast Windows runs? Me neither.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top