How to speed up saving data to database over the internet?
- by robert_d
I am using C#, Entity Framework and SQL Server 2008 Express.
I am connected to the database over the internet.
What is the best method to speed up saving/updating data to database?
It takes 87 seconds to save 180 records to the database.
It takes only 3.5 seconds to save the same number of records to local (on the same machine) SQL Server.
For every record that I save/update I check if record with this primary key exists in the database,
if it doesn't exists I simply save it,
if it exists I update it using ObjectContext.ApplyCurrentValues(entitySetName, currentEntity) method.