Friday, February 27, 2009

LINQ versus SqlDataReader versus DataSet performance

There is the potential that switching to DataSets rather than business objects will add a significant overhead and adversely affect performance.

  • "accessing data through the DataReader is a magnitude of 27-56 times faster than accessing data using the DataSet"
    http://www.devx.com/vb2themax/Article/19887/1954?pf=true
  • -------------------------------------------------------------------
    Strongly Typed DataSet Breakdown
    -------------------------------------------------------------------
    175.11% slower than SQL Data Reader
    216.26% faster than LINQ to SQL
    112.17% slower than LINQ to SQL Compiled
    -------------------------------------------------------------------
    
    Performance benchmarks for LINQ vs. SqlDataReader, DataSet - LINQ Compiled Queries: Part 2 http://www.devtoolshed.com/node/12