Reputation: 155
I have a process which runs exactly similar query twice(There reasons why) , First execution takes about 3 minutes.
The same query when executes second time it takes 4 seconds.
What can be causing this ?
This behavior is consistent, both times query is fired on exact number of rows and columns.
Upvotes: 0
Views: 256
Reputation: 2816
You need to generate views for your entity using : Entity Framework Power Tools Beta 3
It will generate pre-compiled views to improve performance.
Then you need to add the generated file ( EntityName.Views.cs ) to your project.
P.S: You need to generate views each time you modify your entity.
Upvotes: 1