Insert takes too long, code optimization needed

Posted by Pentium10 on Stack Overflow See other posts from Stack Overflow or by Pentium10
Published on 2010-01-22T23:46:03Z Indexed on 2010/04/04 9:53 UTC
Read the original article Hit count: 287

I have 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 am still after answers.

© Stack Overflow or respective owner

Related posts about c#

Related posts about sqlite