I am developing software based on the Entity Framework for processing data in an MS SQL Server 2008 database.
[Problem 1]
I just tried to insert some small data ( about 2 MB ) from my program into the database: performance is very poor! It takes more than 1 minute to insert this data !
I am trying to generate precompiled views, I have the same results: - (
My code uses a business layer (automatically created from a .edmx file with a T4 template) to manage data at the service level. It is very important to navigate in the relationship of objects.
How to improve the performance of these inserts using the Entity Framework?
[Problem 2]
In addition, before inserting data into the database using the SaveChanges () method, I fill out my object context using the AddObject () method. I add about 100,000 small objects (about 2 MB) to the object context using AddObject (): it takes a very long time (more than 10 minutes)!
How can I reduce this time?
UPDATE
Should my program store more than 50 MB in a database in less than 2-3 minutes? Do you think this is possible with EF?
source
share