0

I implemented the suggestion in this how to article from msdn, and my first initial entity framework query is still taking 3-4 seconds. The same query comes back instantly with a SqlCommand. Does pre-generating views work with entity framework 4.1?

How to: Pre-Generate Views to Improve Query Performance

Thanks,

Mark

mservidio
  • 12,817
  • 9
  • 58
  • 84
  • Are you using EDMX or fluent / data annotations? mapping – Ladislav Mrnka Aug 28 '11 at 12:49
  • How long does the initial query take without pre-generating views? I think there are other initial overheads beyond view generation with EF, that may account for the 3-4 seconds. – Ralph Shillington Aug 29 '11 at 12:43
  • about 3-4 econds also. and to test it, i created an initial query that only queries a tiny table with 5-6 records. – mservidio Aug 29 '11 at 13:53
  • I looked at this page: http://msdn.microsoft.com/en-us/library/cc853327.aspx and it seems that that is the highest performance overhead, so I was addressing that one first. Any ideas as to what performance overhead I should address next? – mservidio Aug 29 '11 at 13:54
  • Strange, I did a shrink and repair on my SQL ce db, and EF's initial query is significantly quicker. – mservidio Sep 01 '11 at 15:25

1 Answers1

0

Model-first didn't change in EF 4.1, so yes, it does work.

Craig Stuntz
  • 125,891
  • 12
  • 252
  • 273