views:

318

answers:

2

I need to transfer data from sql server 2008 express to MySql. The data is around 2.000.000 records in total and 4 tables.

In C# I can insert these records very quickly with the Table-Valued parameter. (Around 50 seconds). Within a transaction.

Now I was wondering if there is something similar for MySql that I can do in C#.

A: 

Are you locked into using C# for the migration? If you're not and only want to transfer the data you can use the MySQL Migration Toolkit to do the transfer for you.

Andre Miller
I'm locked into using c# and I need only to transfer the data
Gerbrand
+1  A: 

Read the explanations in the MySQL Reference Manual. The best you can do is use LOAD DATA INFILE while disabling indices before and recreating (and thus batch-calculating them) afterwards. There is more interesting advice if that doesn't work out for you.

David Schmitt
I'm curious in what the other more interesting advice is :)
Gerbrand
@Gerbrand: Sorry to disappoint you, but I meant "in the article."
David Schmitt