we have some large tables - and we do some selects on them.. we often read through the select - and stop somewhere in the middle..
So lets say we have 1M rows - we read 500,000 and then close the DataReader..
this step can sometimes take 10-15 seconds.. simply closing the datareader!
what is going on in this step that is taking so long? is there a better way to do this?
If we dont close it - then it goes much faster.. however, we get the "out of sync" error... so we need to close it..
we use pooling and fetchall=false (otherwise its even slower if this is true)
Jon
myDataReader.Close() takes forever
-
- Posts: 27
- Joined: Sat 28 May 2005 20:37