I am using the code below to insert a 2.2MB file into a MySQL database in the cloud using Azure (the free version) with 36 thousand rows and 8 columns of doubles.
MySqlCommand sqlCmd = new MySqlCommand( "LOAD DATAINFILE 'Data4.csv' INTO TABLE ljmuracing.record FIELDS TERMINATED BY ',';", mConnection); sqlCmd.ExecuteNonQuery(); mConnection.Close();
The problem is that it's extremely slow; about 2 thousand rows uploaded every 5 minutes. Sometimes, the connection times out.
How can I speed this up? Am I doing something extremely inefficient?
My upload speed as of now is 14 MB/s, so I don't think it is that.