Speed up Performace on large amount of data

Speed up Performace on large amount of data

Postby AndyR » Mon 10 Sep 2012 07:44

Hi,

i use following code to fill a datatable:
Code: Select all

public static DataTable SelectAusfuehren(String istatement)
        {
           var comm = new OracleCommand { Connection = UserConnection.getConnection() };
           comm.CommandText = istatement;
           var dt = new DataTable();
           var da = new OracleDataAdapter(comm);
           da.Fill(dt);
           return dt;
        }


Now 2 million Rows with 12 colums are returned by my select an it needs about 36 seconds.
I already used the search of the forum but i was not able to find anything.
So, i there anything i can do to speed up the performance (properties etc). I need all colums and rows.

Thank you very much!
Andy
AndyR
 
Posts: 3
Joined: Mon 10 Sep 2012 07:32

Re: Speed up Performace on large amount of data

Postby Shalex » Tue 18 Sep 2012 11:21

We recommend you to employ OracleDataReader - it retrieves data from the database faster and consumes less memory: http://www.devart.com/dotconnect/oracle/docs/?Devart.Data.Oracle~Devart.Data.Oracle.OracleDataReader.html.
If you need to use OracleDataTable, try changing the FetchSize property value of the OracleCommand object of your OracleDataTable and checking the results: http://www.devart.com/dotconnect/oracle/docs/?Devart.Data.Oracle~Devart.Data.Oracle.OracleCommand~FetchSize.html.
Shalex
Devart Team
 
Posts: 7709
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle