Reputation: 17008
Which one of these techniques is faster?
DbDataAdapter dataAdapter = _factory.CreateDataAdapter();
dataAdapter.SelectCommand = _command;
dataSet = new DataSet();
dataAdapter.Fill(dataSet);
DataTable dt = new DataTable();
IDataReader iDataReader= _command.ExecuteReader();
dt.Load(iDataReader);
iDataReader.Close();
Upvotes: 0
Views: 354
Reputation: 166486
Have a look at these links
DataReaders, DataSets, and performance
and
DataAdapter.Fill preferable to DataReader?
As mentioned in the comments to your question. It would be best to test for the given situation at hand, there is never a one rule applies to all.
Upvotes: 1