We have a 'server' that is configured with SQL Server 2008 R2 on machine A. In the same LAN we have machine B which is a machine with identical hardware without the SQL Server installation.
We have a set of unit tests that request some records from the database and maps them to the proper CLR objects. When this unit test is run from Machine A, with SQL Server, the tests run in 5ms.
If I copy the code of the test to machine b and run it the tests take a total of ~50ms which is a significant increase if this is only caused by network overhead.
The queries executed do not send a lot of data (there are no blobs/xml data in the columns), the total data is around a few KB. The data is read using an IDataReader
. We use a single connection which is opened once and is used to fire about 24 queries to the database.
Are there any tips/tricks that I can try in order to test if it's really the network overhead slowing the execution? I have a feeling something is just not configured properly in SQL Server.
This sounds like normal behaviour, its just network latency... To confirm if these figures sound reasonable, ping one server from the other, I would not be surprised if this reported a roundtrip well into double digit milliseconds whereas a ping of your local machine should come in a 1ms... I agree with Pondlife, sounds like par for the course for a healthy LAN.