The suggestion to use the DataReader was only for testing purposes. David was saying that it should be quick to fetch the results reading from the DataReader in a loop. That will tell you whether or not it is as quick as executing in SSMS. If not, something else is going on (hence his suggestion to try using SQL Profiler).
I'm still curious as to how many rows you're returning ... 20-30 seconds to complete the query seems like an awfully lot of data being returned. How many rows are returned and do you really need them all?
~~Bonnie DeWitt [C# MVP]
No comments:
Post a Comment