I\'m having a lot of trouble with the OracleDataReader in ODP.Net. Basically, I have a parameterized query that takes anywhere from 1-5 seconds to run (returning around 450 rec
May be I am wrong, but you actually fetch the data in this row: While dr.Read
, and not when you are executing the reader. So this can explain why even without doing nothing, dr.Read
take all your time.
I'd try to change your command to
1). Run plain sql (without parameters)
2). Run using regular (not binding variable) parameter
3). Move the sql code to Stored Procedure if possible