| GetOrder vs. GetDataSetâDirect Connection |
| Data Access |
GetOrder |
GetDataSet |
Performance Ratio |
| Computer 1 (MS-10) |
| Parameterized SP |
912.23 |
273.10 |
3.34 |
| Parameterized T-SQL |
753.10 |
253.72 |
2.97 |
| Performance ratio |
1.21 |
1.08 |
|
| Computer 2 (MS-7) |
| Parameterized SP |
693.80 |
229.99 |
3.02 |
| Parameterized T-SQL |
621.95 |
221.56 |
2.81 |
| Performance ratio |
1.12 |
1.04 |
|
|
|
|
|
| Average ratios |
1.16 |
1.06 |
3.03 |
Table 3 Compare SQLDataReader to SQLDataAdapter and DataSet. Retrieving a pair of forward-only resultsets with a single ExecuteReader instruction to create an SqlDataReader is three times faster than retrieving a pair of DataTables with an SqlDataAdapter to instantiate a DataSet object. The few lines of code you need to assign resultset values to DALC objects pay major performance dividends.
|