Using Dataset for large amounts of data

B

Brent

Hi,
I'm wondering if it is good to use datasets for large amounts of data with
many users. I'm talking tables with 130,000 records and 15 columns. And we
want current data, so no cached data. Right now we are using an
OleDbDataReader and then just doing reader.Read() to go through the
necessary records. So would using a dataset be good, or bad for this
compared to what we are doing?

We're looking at it again to get the features of transactions out of it, but
are not sure if they can handle that much data very well?
 
R

Raymond Lewallen

Holy cow!! Why would you bring back that much data? First thing I would
do, regardless of what you are trying to do, is find a way to greatly limit
that number of records you are returning somehow. Do your records have a
unique key of some sort? And are they ordered somehow, maybe by the unique
key (that would be prefered)?

DataReaders will perform faster than datasets. DataSets are disconnected
from the database and must store all their information in memory.
DataReaders remain connected to the database and pull records from the
database as you request them (i.e. reader.Read()).

HTH,

Raymond Lewallen
 
C

Cor

Hi Raymond,

I agree completly with the first part of your message. With the second part
I do not (completly).
Holy cow!! Why would you bring back that much data? First thing I would
do, regardless of what you are trying to do, is find a way to greatly limit
that number of records you are returning somehow. Do your records have a
unique key of some sort? And are they ordered somehow, maybe by the unique
key (that would be prefered)?
DataReaders will perform faster than datasets. DataSets are disconnected
from the database and must store all their information in memory.
DataReaders remain connected to the database and pull records from the
database as you request them (i.e. reader.Read()).

It is not said that DataReaders perform faster than using the dataadapter
which uses also the datareader.

Main thing is that it fixes very efficient the data in memory while with a
datareader you need to do that item by item.

The amount of data with a right selection, as you stated before, can often
be that few, that it is probably often almost the same amount of bytes as
the code needed to retrieve it using a datareader, so that can not be a
point. (and in a modern computer absolute not relevant).

Moreover when readed it the dataset becomes very handy to handle.

Just my thought to give the OP another opinion, while I can think about
situations where your statement is right.

Cor
 
R

Raymond Lewallen

Brent,

I posted arguments and sample code on DataSet vs DataReader on a response to
Cor on this post dated 4/7/2004 08:24 AM CST. Be sure and read that and it
my help further clarify what I failed to completely clarify in my initial
response post yesterday.

Raymond Lewallen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top