A
Ashish
hi Folks,
I am about to start development on a new framework, and contemplating
whether to use datareader to create objects or to use DataSets to create
object.
For a test scenario i created two classes , with each having 8
properties. Then i created two Data creation logics, one that fetched
dataSets from DAL and creates the objects, and second one creates
objects from DataReader.
the dataaccess is done through the microsoft dataaccess application block
these are my performance results.
Objects created 4 220 22000
DataReader 1.40 2.006 50.59
(Avg Time in secs)
DataSets 1.42 2.01 50.2
(Avg Time in secs)
the code is exactly the same (except the actual creation logic) , the
database is SQL Server 2000
so the question is , are datareaders really fast (as microsoft says) or
am i missing something. ?
Please comment
I am about to start development on a new framework, and contemplating
whether to use datareader to create objects or to use DataSets to create
object.
For a test scenario i created two classes , with each having 8
properties. Then i created two Data creation logics, one that fetched
dataSets from DAL and creates the objects, and second one creates
objects from DataReader.
the dataaccess is done through the microsoft dataaccess application block
these are my performance results.
Objects created 4 220 22000
DataReader 1.40 2.006 50.59
(Avg Time in secs)
DataSets 1.42 2.01 50.2
(Avg Time in secs)
the code is exactly the same (except the actual creation logic) , the
database is SQL Server 2000
so the question is , are datareaders really fast (as microsoft says) or
am i missing something. ?
Please comment