LINQ to SQL: Under the Microscope

Rico continues his series on LINQ to SQL performance. In this post he takes a look at the breakdown of where the time is being spent.  It's not looking good for the extra overhead of query translation. Rico ponders a solution.

 Of course, if you ignore the one-time cost of JIT'ing the assembly, the translation overhead is only about 30% over the total cost; 60% is still reading the data which includes executing the query. Since we know that the 'hot' cost of using LINQ to SQL overall is 7 times more expensive than SqlDataReader alone, there's still a large portion in the 'reading the data' section that is above and beyond SqlDataReader. That, of course, is the cost of materializing objects out of the results. That cost appears to be much larger than the upfront query translation; which I'm sure Rico will conclude in his next post.  Just stating the obvious. :-)