April 6, 2010 at 6:43 am
hi,
what is the best way to insert millions of records how can i optimize the insertion, and how can we do optimize of a particular database.
thanks,
🙂
April 6, 2010 at 6:52 am
There is no way to answer that given the information that you provided. It would be helpful to know what is being inserted, the size of the existing table, the indexes, and the hardware.
Without anymore information, I would suggest off-hours.
/* ----------------------------- */
Tochter aus Elysium, Wir betreten feuertrunken, Himmlische, dein Heiligtum!
April 6, 2010 at 7:26 am
1. Use BULK INSERT method
2. Uss batch approach in DML operations(let says work on 10,0000 records one by one)
-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done;-)
April 6, 2010 at 7:29 am
Use BCP. It will faster and not logged
April 6, 2010 at 7:37 am
yes, as vyas pointed out, use BCP.. very fast utility to bulk insert millions of rows..
April 6, 2010 at 7:40 am
bcp and BULK INSERT are not the only methods, and are not necessarily minimally-logged.
For full, and accurate, details see:
Importing and Exporting Bulk Data (Books Online link)
Be sure to explore the related links and sub-sections from that page, to fully understand the issues.
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply