Simply upgrading .NET Framework from 4.0 to 4.5 can improve database query performance
Posted: (EET/GMT+2)
If you are using Entity Framework (EF) for your data access in your .NET 4/C# applications (or Visual Basic .NET for that matter), you are probably aware, at least on principle, how Entity Framework converts your LINQ data query statements into SQL statements.
Although accessing data with LINQ and EF is pretty often a thankful job compared to writing your SQL statements manually, there are also some situations where things aren't as easy. As with SQL, LINQ queries can become complex and difficult to maintain. Personally, I prefer to build my more-complex LINQ queries step-by-step and taking advantage of the lazy data loading feature (the query isn't actually executed until you start accessing the query results).
Now that .NET 4.5 is here along with Visual Studio 2012 and all, there is good news for ADO.NET database developers and especially those using Entity Framework. Shortly put, simply installing .NET 4.5 framework on top of an existing .NET 4.0 framework can increase the query performance of your EF queries with LINQ.
I did some testing on a mid-size ASP.NET web application I've been building, and in certain cases – those utilizing multi-table joins and subqueries – can automatically increase their performance tenfold. Try it yourself, it's an upgrade that hard to say you could be sorry for.
Happy hacking!