Linq to Sql Performance Improvements

by Lord Cod3n 26. August 2008 04:53

The originally article can be found here:

http://blogs.msdn.com/dinesh.kulkarni/archive/2008/08/10/net-fx-3-5-sp1-two-perf-improvements-linq-to-objects-and-linq-to-sql.aspx

Cast<T> break change.  The RTM version allowed for you to cast object that should have been invalid.  You could query and cast a float to an integer.   This is not allowed because of the possibility of data loss.

Standard execution time for querying a collection has been improved.  I understand the performance increase to apply to using Where and Sort.  However the way the article reads there seem to be improvements to queries not using Where or Sort as well.

Linq to Sql has fixed an error when caching identity based data.  Previously the query would be executed again even if the identity row was already in the cache.

A lot of my development at this time is leveraging LINQ to SQL, and LINQ.  These are both huge time savers and remove the tedium of writing that same old data access layer.  It allows you to spend some time learning some new patterns and working on writing solid code.  I think with these tools in our toolbox part of the data access layer problem has been solved.  They allow you to focus more on the application than the data. 

There are other features introduced into this problem space.  They target this problem as well and include the entity framework, and by extension the LINQ to Entities.  This gets the middle and front end developers more into domain based programming instead of a one to one class mapping of objects from the database.  Go forth and abstract.

As always Code Happy,

Lord Coden

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

Comments

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

About the author

William Moore is the lead Software Architect and Technologist for Coden Enterprises. He has more than a decade of software development experience primarily Microsoft Platforms.  William enjoys the full gamit of coding everything from the UI down to the database.

Most comments

Page List