A
Andre T.
This is more of a curious observation than anything else.
We were in a scenario where we needed to pull about 1000
records from the database. We only needed read access, so
we used a datareader because it was supposed to perform
better.
As we ran that app, we discovered that the datareader was
pretty slow looping through it's records...It was
accounting for about 65% of the total page processing
time. We thought that there were maybe too many records,
so we set up a test to see how a dataset would perform.
After we ran several test runs, we found almost no
difference in performance at all...we're talking less than
one-half of 1% (0.3521 sec versus 0.3529 sec - average
over 100 test trials). The allocation of processing time
is completely different (the dataset uses it's bulk
pulling the data while the datareader uses it's bulk
looping through it's records), but overall performance is
the same.
Does anyone know anything about this? I thought for
read/forward-only access datareaders were supposed to be
faster? Any input would be appreciated. Thanks.
Andre T
P.S. We also ran a test pulling about 250 records, and the
results were the same.
We were in a scenario where we needed to pull about 1000
records from the database. We only needed read access, so
we used a datareader because it was supposed to perform
better.
As we ran that app, we discovered that the datareader was
pretty slow looping through it's records...It was
accounting for about 65% of the total page processing
time. We thought that there were maybe too many records,
so we set up a test to see how a dataset would perform.
After we ran several test runs, we found almost no
difference in performance at all...we're talking less than
one-half of 1% (0.3521 sec versus 0.3529 sec - average
over 100 test trials). The allocation of processing time
is completely different (the dataset uses it's bulk
pulling the data while the datareader uses it's bulk
looping through it's records), but overall performance is
the same.
Does anyone know anything about this? I thought for
read/forward-only access datareaders were supposed to be
faster? Any input would be appreciated. Thanks.
Andre T
P.S. We also ran a test pulling about 250 records, and the
results were the same.