I’ve some code I use to transfer a table1 values to another table2, they are sitting in different database.
It’s slow when I have 100.000 records. It takes forever to finish, 10+ minutes.
(Windows Mobile smartphone)
What can I do?
cmd.CommandText = "insert into " + TableName + " select * from sync2." + TableName+"";
cmd.ExecuteNonQuery();
EDIT
The problem is not resolved. I’m still after answers.
1] You can set the following parameters in your connectionString
which has its own limitations. check this link for details
The above will increase the cache size ultimately(cache_size & page_size) but you could lose some data in case of force shutdown of your system(synchronous=off).
2] You can wrap your insert statements inside a transaction like this
3] There is one more trick which is well explained in this page. Check it out
Hope that helps
Cheers!