I have a stored procedure in MySql that inserts 10.000 registers. When I execute it from MySql command line the query takes 1sec but when I do it from the .NET C# application I wrote, it takes around 8sec.
Do you have a hint about what its going on?
-
The MySql Server version is 5.5.16
-
And also for doing the test I’ve tried some version of the Mysql .Net connector but I get the same results.
-
I’ve executed the console app on two different computers 32 and 64 bits.
C# code:
string connStr = "ommited";
MySqlConnection conn = MySqlConnection(connStr);
MySqlCommand micomando = new MySqlCommand("CALL my_procedure();", conn);
micomando.Connection.Open();
micomando.ExecuteNonQuery();
ArrayList recordSet = new ArrayList();
conn.Close();
Thank you in advance!
Comapare
ExecuteNonQuerytime and MySql command line execution time.Query execution is not the only task done by the .net program.