With .NET 4.0 a lot of new features and technologies will see the light, as long as others will get improved, and Entity Framework will be one of those technologies that will get improved.
A lot of this changes are being made on the Query pipeline, that means that are being done on the translation from Linq to SQL code, and some of the changes in Beta 1 are the following:
- Avoid projecting all columns in nested queries
- Instead of making a query for the complete set of columns and the make the projection on top of it, just make the projection and get only the needed columns
- remove the Is null check when using Joins
- Avoid having a child left outer join if no column from that relation is needed for the projection
- Instead of having several Or’s in place such as “CategoryId = 1 OR CategoryID = 2 (…)” have “CategoryId In (1,2,…)”
- Better use of the SQL Group By in order to simplify the query
Some of the changes after Beta 1:
- Elimination of null sentinels
- In the output query there is often the constant 1 projected both in nested and in top-most queries. By avoiding it and reusing other columns for the same purpose in many cases we are able to avoid levels of nesting.
- We now generate non-unicode constants and parameters when these are used in LINQ to Entities queries in comparisons with non-unicode columns. This allows indexes to be used by SQL Server.
You can read more about this topic on this ADO.NET Team post.