We have a query that takes 2 seconds to run in Sql Server Management Studio, but it takes 13 seconds on the client screen. I used dotTrace to profile the source code and noticed that this SNIReadSync method (part of the ADO.net collections) takes a long time to complete its task (9 seconds). I ran my source on the server so that I could omit the network effects and the result was the same.
It doesn't matter if I use OleDBConnection or SqlConnection.
It doesn't matter if I'm using a DataReader or a DataSet.
The connection pool does not solve this problem (as my result shows).
I was looking for this problem, and I could not find the answer to the question of what this method really does and how we can improve it.
here is what i found on StakOverFlow, which is also not useful:
https://stackoverflow.com/a/316835/ ...
source
share