SqlCommand.ExecuteReader takes too much time

  • Thread starter Thread starter Achim Domma
  • Start date Start date
A

Achim Domma

Hi,

I have a table containing about 14,5 million records and I want to
iterate over the complete data. If I execute a "select * from
mytable", the call to ExecuteReader takes some hours to return. In T-
SQL I can open a cursor and start reading immediately. As far as I
understand, ExecuteReader/SqlDataReader should behave the same way -
but it seems like I'm wrong. Any hint?

regards,
Achim
 
Achim,

Are you starting your "T-SQL", whatever you mean with that as the
DataReader uses as well T-SQL, from the same machine as your DataReader?

Cor
 
Back
Top