Entity Framework Performance Inconsistency Compared to Sql Management Studio
Posted
by AndyV
on Stack Overflow
See other posts from Stack Overflow
or by AndyV
Published on 2010-05-09T03:52:04Z
Indexed on
2010/05/09
3:58 UTC
Read the original article
Hit count: 408
sql-server
|entity-framework
I'm getting timeouts with a very basic EF statement. I'm simply doing a select from a single table with a Entity.Title.StartsWith("test") and a .Take(25). When I run this for a search that returns no results I get a timeout.
If I profile and grab the sql statement it looks fine, and if I run that sql in Management Studio it runs in a fraction of a second!
Why would the same query run sub-second in Management Studio and timeout when generated by EF and called from an Asp.Net app?
© Stack Overflow or respective owner