Tuesday, February 17, 2009

ADO.Net Facts

Came across a Microsoft Webcast and here is an interesting part on ADO.Net performance metrics :

  • DataReader is 16% faster than the DataSet
  • SqlDataReader is 115% faster than the OleDBDataReader
  • Ordinal referencing of columns rather than by name is 11% faster Eg: dr[1] rather than dr["NAME"]
  • Proper column casing increases the performance by 1% Eg:dr["NAME"] rather than dr["Name"] depending on the column name.
  • Inline script is 233% faster than the DataGrid
  • DataGrid with viewstate disabled is 66% faster than the DataGrid with Viewstate enabled.
  • DataGrid without templates is 39% faster than the one with templates
  • Explicit cast is 11% faster than the DataBind expression. Eg: ((DbDataRecord)Container.DataItem)["NAME"] is better than DataBinder.Eval
    (Container.DataItem, “NAME")
  • Using DataCache is 637% faster than the standard DataGrid

Source : Microsoft Webcast

1 comment:

Vadivel said...

Thanks for the info! Can you post the URL for the webcast if possible?