Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Regarding the new EF5 auto-compiled queries feature

I've made few tests regarding the new EF5 auto-compiled queries feature. The problem is that I don't see any difference in the performance.

I've made one project with .NET 4.0 and EF4.0 without using compiled queries. I've made another project with .NET 4.0 and EF4.0 with compiled queries - there was 50% improvement in performance.

And then I tried to create a project with EF 5.0, in which there was basically no difference in performance.

All the projects were asp.net mvc (first two were version 3, the last one - version 4).

Am I missing something here ? Is there something special I need to do to enable the auto-compile feature ? I just created MVC 4 project with pre-build EF5 inside.

The query I am testing with is rather verbose, three joins and multiple filters inside.

Thank you

like image 481
user1741984 Avatar asked Nov 04 '12 21:11

user1741984


1 Answers

Auto compiled queries are available in the part of EF5 live in the .NET Framework 4.5. If you are running EF5 on .NET Framework 4 queries are not automatically compiled.

like image 167
Pawel Avatar answered Sep 28 '22 01:09

Pawel