DataReader getting slow after fetching 70000 records
Hi,
I am invloved in a re-engineering project, which requires a table with 900000 records to be fetched in memory. I am using DataReader for the same but surpisingly; it is taking 10 minutes to fetch 80000 records. On debugging, I noticed that DataReader is getting slow in fetching the records after 70000.
I have tried using the following providers, but same result
1. ODBC.NET
2. OLEDB.NET
3. ODP.NET
I am also pasting the code using OLEDB Provider for reference.
OleDbConnection objConnection = new OleDbConnection(ConnectionString) ;
objConnection.Open() ;
m_strQuery = @"SELECT DEALID,CMDDATE, SEGMENT1 FROM DELIVERYSHAPE WHERE DEALID < 20000 " ;
This query will fetch 84,000 records
OleDbCommand objCommand = new OleDbCommand(m_strQuery, objConnection) ;
OleDbDataReader objReader = objCommand.ExecuteReader() ;
while ( objReader.Read() )
{
lCounter ++ ;
}
Database is Oracle 9i and client machine is Win XP.
Any suggestions / help / link / pointers would be highly appreciated.
Regards
Chetan Sawhney