SYSK 258: dr[columnIndex] or dr[“ColumnName”]? The cost of field name lookup…

Are you still debating whether the performance benefits of dr[columnIndex] outweigh the benefits of readability and maintainability of using dr[“ColumnName”] instead?  Then, read on…   When using SqlDataReader class, the difference between getting data by index or column name is the cost of mapping column name to column index (the GetOrdinal function call).  Omitting the…

8

SYSK 257: .NET way to analyze SQL data I/O performance

Would you like to know how many server round trips it took to retrieve your data using ADO.NET?  Would about the number of bytes sent and received?  Total connection time?  Command execution time?  Number of returned rows?   Welcome to the System.Data.SqlClient.SqlStatistics class.  While the class itself is unavailable outside the .NET framework (it’s implemented…

0