Click here to Skip to main content
15,999,481 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I have a application which connects to SQL server which is at server.

It takes a lot of time to retrive data when i ran the application from my system,but when i ran the same application at server it runs with in one second.

Is there any way so that the Query which takes lot of time to run at my system takes less time.

Regards,
Sagar
Posted

1 solution

If it's the same query then your slowness is due to network latency. It's possible that your network has some issues but it's more likely that it just takes longer from your machine. The data has much farther to travel.

There is not anything you can do in the query itself to make it faster on your machine vs. on the sever.
 
Share this answer
 
Comments
Member 10372820 31-Oct-13 11:48am    
Is there any way so that i can Improve this Latnecy issue with network?? Will WCF or Web service help in fast dataretrival?
ZurdoDev 31-Oct-13 11:55am    
No. In .Net you can use a DataReader but the problem is still that the data needs to transfer over the wire. If you want to improve the performance of your network you should talk with your network admins.

Do you know where the server is physically compared to where your computer is?
ZurdoDev 31-Oct-13 11:55am    
It takes 1 second on server, how long does it take on your machine?
Member 10372820 31-Oct-13 11:56am    
My server is in US and my machine is in INDIA.
Member 10372820 31-Oct-13 11:57am    
It takes 23 seconds on my machine

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900