Entity Framework Performance Problem

Posted by Steve Horn on Stack Overflow See other posts from Stack Overflow or by Steve Horn
Published on 2010-03-29T12:21:56Z Indexed on 2010/03/29 12:23 UTC
Read the original article Hit count: 395

Filed under:
|

I'm hoping that someone can help me understand how to overcome a performance problem I'm running into with the latest version of the Entity Framework. In my test, I created my model from a database consisting of around 80 tables.

The problem that I'm running into is that the cost of the very first query I run on a thread is very expensive. If I run without pre-compiling views the first query takes anywhere from 5800 to 6600 milliseconds. If I pre-compile the views (see this article) I can get the initial query cost down to about 2800 to 3200 milliseconds. 3 seconds for each request is still unacceptable for my needs.

Subsequent queries are very fast.

Can you please help me understand how to eliminate the poor performance of the initial query?

I'm using the version of entity framework that ships with Visual Studio 2010 RC.

© Stack Overflow or respective owner

Related posts about entity-framework

Related posts about ADO.NET