Performance considerations between data reader and dataset

  • Since no memory buffer is maintained by the data reader, it takes up fewer resources and performs more efficiently with small number of data operations.

    The dataset, on the other hand is more efficient when large number of updates are to be made to be DB. All the updates are done in the local memory and are updated as a batch. Since DB connection remains open for the short time, the DB doesn't flooded with incoming requests. However, since the dataset stores the records in the local buffer, it takes up more resources and may effect the overall performance of the application

  • The data reader is more useful when need to work with large number of tables. DB in non-uniform pattern and you need not execute the large number of queries on few particular tables.

    When you need to work on fewer number of tables and most of the time you need to execute queries on these fewer tables, you should go for dataset.

  • If multiple users are using the DB and the DB needs to update every time, you should choose data reader.

    Instant updates of DB are not required; Dataset provides optimal performance by making the changes locally and connecting to the DB then update as a batch. But it will reduces the network bandwidth if the DB is access through network.

0 comments :

Post a Comment

> Related Posts with Thumbnails
 

Copyright © 2012. GS dot net - All Rights Reserved - Design by BTDesigner - Proudly powered by Blogger