3

I am using the Entrprise Library to Get Records from Oracle11g as below.

OracleDataProviderCommand dbcommand=new OracleDataProviderCommand(); 
//OracleDataProviderCommand has been derived from System.Data.Common.DbCommand.

 ...Adding Parameters...

//Executing the dbCommand using Enterprise Libary's ExecuteDataSet(DbCommand command) method as below,
DataSet Results = database.ExecuteDataSet(dbCommand);

Finally I am iterating through the data Table's and Creating the List returning from the Service. I got struct with a Huge Performance problem since the DataSet returning only 64KB(Default Fetch size) of Data from the DB per cycle.

My question is How to Improvise the Performance of DataSet to List Conversion. And If this because of FetchSize then how to set FetchSize.?

Thanks in Advance,

tereško
  • 58,060
  • 25
  • 98
  • 150
Krishjs
  • 358
  • 2
  • 17

1 Answers1

1

I wouldn't recommend using that method. Instead have your own version of a DataSet (or you can use the existing one in the framework) for the results and fill them in yourself using an implementation of a DataReader (whether it's Oracle's or Microsoft's).

In your case, it is even better because as you continuously receive data from the DataReader you can just add it to the List; instead of having to wait to get the whole DataSet and then iterate through it again to populate your list.

Is datareader quicker than dataset when populating a datatable?

What's better: DataSet or DataReader?

http://www.techrepublic.com/article/which-is-best-for-you-datareader-or-dataset

Community
  • 1
  • 1
Ramie
  • 1,171
  • 2
  • 16
  • 35