Can anyone tell me if there is a real big speed difference between quering into a datareader as compared to a dataset.
This could be a query ranging from pulling 1 record to 3000+ records.
Printable View
Can anyone tell me if there is a real big speed difference between quering into a datareader as compared to a dataset.
This could be a query ranging from pulling 1 record to 3000+ records.
If speed is really an issue then use DataReader whatever the number of rows you'll retrieve..
If you want to change something etc maybe a dataset will be the best, it all depends in what you want
why don't you test it out yourself :shrug:
DataReader is always faster. The key is understanding the differences. That will make your choice a little bit easier. The DataSet is an in memory representation of the DB. So if you are gonna be doing and updates, deletes or adding new rows, I would suggest using a DataSet.
DataReader is good for just getting the data to present to the user, since its using a forward only cursor.
When I tested this, the dataset used more memory and was slower than the datareader (which we all know) but the difference got narrow as we started pulling more data.