Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

What is the optimal amount of data for DataSet.

Posted on 2004-09-11
4
Medium Priority
?
196 Views
Last Modified: 2010-04-15
Hi
 I have a question, I’m doing some database application and I have to retrieve significant amount of rows from database in one time let say 2000 rows. Would it kill performance of my application?  I mean computer memory for instance.

How many rows can I store in DataSet without making user life miserable.

Anyone has an idea how efficient is dataSet in C#.


Thanks.
0
Comment
Question by:knobloch
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 15

Expert Comment

by:Timbo87
ID: 12035510
If you need to edit the data, a DataSet or DataTable is definitely the way to go. If you're only reading the data or databinding, use a DataReader, which is more efficient but not directly editable.

Here's an articles on the pros and cons of a DataSet vs. DataReader:
http://msdn.microsoft.com/msdnmag/issues/04/06/DataPoints/default.aspx
0
 
LVL 19

Accepted Solution

by:
Fahad Mukhtar earned 1400 total points
ID: 12037639
Just an addition to what timbo has said that you can also use dataset for reading when the number of records are small , for large number of rows DataReader always gives best performance ..  DataReader are more faster than datasets.. the only drawback i found using datareader is that they dont have any property which return the number of records.  on the other hand you can also use the datareader + Stored procedures to update/delete from the DB
0
 
LVL 19

Expert Comment

by:Fahad Mukhtar
ID: 12037756
here are some differnces
Dataset
-Need to disconnect/distribute data
-Need support for modifying/updating data
-Need data schema support

Datareader
-Fast read-only access
-When you want to use the data for something other than a dataset

Source:
http://donxml.com/allthingstechie/archive/2004/06/25/862.aspx
Info:
DataSet - 411 ( 18.6% slower than the DataReader)
0
 
LVL 10

Assisted Solution

by:ptmcomp
ptmcomp earned 600 total points
ID: 12039750
If you have large amount of data you have two possibilities:
- load only small amounts of data in a DataSet (untyped datasets are a bit faster)
- don't use DataSets
The DataSets are not made for large amount of data. To point you in the right direction we should know a bit more of the application you are going to build. I prefer using my own data objects when using them in business logic. Custom serialization can speed up serialization and deserialization.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question