Entity Framework 6 Performance

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for DB2
Post Reply
Posts: 6
Joined: Wed 12 Feb 2014 00:43
Location: Melbourne, Australia

Entity Framework 6 Performance

Post by david.tuke » Thu 17 Jul 2014 08:58

Hi All;

Experiencing very slow "cold" reads - ie first read very slow 6-8 seconds:

DBSet.FIND(1) takes very long on first read; thereafter okay (ms) but first time very slow

Any Ideas?

Site Admin
Posts: 8885
Joined: Thu 14 Aug 2008 12:44

Re: Entity Framework 6 Performance

Post by Shalex » Mon 21 Jul 2014 15:04

We recommend you to try increasing performance in the following way:
1) employ pre-generated views (http://msdn.microsoft.com/en-us/library/bb896240.aspx) which improve startup time. With Entity Developer (the Devart Entity Model item, *.edml) the feature can be turned on via the View Generation option of EntityContextModel
2) optimize your large tables
a) it is better if the primary key of the table is autoincremental Number. In this case, .Skip(x).Take(y) could be replaced with fastest .Where(t => t.Id >= x && t.Id < x + y)
b) create and place an optimized query in a stored procedure which returns a cursor. Then add this stored procedure in your model and conrol the stored procedure behaviour via its parameters

If you need any further information, please tell us:
a) model type you are using (ADO.NET Entity Data Model *.edmx or Devart Entity Model *.edml)
b) your approach - Code-First, Model-First or Database-First
с) XML mapping or fluent mapping?
d) the version (x.x.x) of your Entity Framework
e) the version (x.x.x) of your dotConnect for DB2

Post Reply