Search code examples
entity-frameworksql-server-ce-4

How to determine reason for slow inserts SQL Server Compact Edition 4.0?


I have an application using the Code First model with Entity Framework 6.1 and SQL Server Compact Edition 4. Inserting into a simple table with an ID, 1 DateTime 2 singles, 2 doubles, and 3 Ints is very slow, ranging from 8 to 15 inserts per second on a system with an SSD.

What are the best tools and techniques to track down the reason for slow inserts in SQL Server Ce 4?


Solution

  • Entity Framework is not designed for fast inserts, you can use my SqlCeBulkcopy library to do fast inserts, and pass it a Collection of EF objects