sql - copy large Nvarchar(max) table from one db to another -


i have table more 60 fields of nvarchar(max) , need copy table db ssis.

i disabled index's , it's helped bit, still it's take lot of time copy table (more 1m rows) - it's take hour moment.

do have idea make run faster?

in experience, fastest way load large data use bulk insert. done flat file, have export data file first, before performing bulk insert.

if don't flat file approach, alternative write clr routine. can use sqldatareader read table storing data in datatable , using sqlbulkcopy bulk insert. advantage of approach can use buffer system limit memory required. sqldatareader memory efficient, reads lines required , drops them memory, datatable not. set limit, 10,000 rows, , whenever datatable hits limit perform sqlbulkcopy , delete existing rows in datatable , carry on next batch.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -