Which is faster dataadapter or datareader




















SqlClient, System. Odbc and System. Sign in to vote. Now my question is tht suppose we have a large database suppose tht we have a table which includes more then 2 lakh records and now suppose we connect tht with our appliction using SQLDataReader tht porivdes a open connection so tht each time we fire a query against database having a different conditions tht first of all fire to the database and then gives a result and if we use SQLDataAdapter then it dosent require open connection, so it tht affect to the perfomance or not??

Plz plz give me ans with breaf description.. Thanks in Advance Friday, August 24, AM. There IS an effect on performance. Wednesday, August 29, AM. Used often in VB. NET programs, DataTable has columns and rows properties.

It is an in-memory representation of structured data like data read from a database. What is data table in C? NET is a database table representation and provides a collection of columns and rows to store data in a grid form.

The code sample in this artilce explains how to create a DataTable at run-time in C. What is data adapter in VB net? The DataAdapter serves as a bridge between a DataSet and a data source for retrieving and saving data.

The DataAdapter provides this bridge by mapping Fill, which changes the data in the DataSet to match the data in the data source, and Update, which changes the data in the data source to match the data in the DataSet. What is data adapter in C? DataAdapter is a part of the ADO. NET Data Provider. DataAdapter provides the communication between the Dataset and the Datasource. What is the difference between DataSet and database?

What is data set in asp net? A DataSet is a container for one or more DataTable objects that contain the data you retrieve from the database. We can set up Data Relations between these tables within the DataSet. What is SQL adapter in C? Thinking my means of populating the data may be adversely affecting the results, I commented it out so that I'm looping through the DataReader using while reader. Rows , with no other code being executed, and now it seems that the times are closer to each other if I perform the queries a few times, but if I do each say times, the DataReader is faster by a magnitude of 2.

While it's unlikely that my legacy application will perform the same lookups that many times in rapid succession we are caching for some data , this is a web application with hundreds of users and I'm trying to find ways to speed it up.

Data access is one thing I hadn't looked into yet. Has anyone seen any real-world performance benefits from using one method over another? The queries being executed in the application rarely return more than rows. Hope it helps. As far as I know, if you have quite a very large of things wanting to be outputted and only for viewing.

Then DataReader forward-reading only is your best friend.



0コメント

  • 1000 / 1000