Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I use two database in my project,One database exist in local and another database has other pc (use as server).
My problem is when connecting the local connection time too long. :doh:
Let me know how can i do to fast connection time?

Please suggestion! which will be the best way for me,

Theingi Win
Posted
Updated 24-Feb-11 22:07pm
v3
Comments
dan!sh 25-Feb-11 3:49am    
This can happen due to a lot of reasons. How are you connecting to the server (through internet or TCP/IP or something else)?
Theingi Win 25-Feb-11 4:09am    
I use TCP/IP connection.Please suggest me which will be good for me.

Thanks For Reply,
Theingi Win

R. Giskard Reventlov 25-Feb-11 3:53am    
Is it that the connection time is too long or it takes a long time to run stored procedures?
Theingi Win 25-Feb-11 4:10am    
No, I haven't use stored procedure.I use with SQL query.

Thanks for Reply,
Theingi Win
R. Giskard Reventlov 25-Feb-11 4:16am    
Okay: so have you checked to see how long the query takes to run? have you created the appropriate indexes? Have you spent some time optimizing your query? Have you run the profiler?

1 solution

Here few things to check:

What is taking more time? Opening the connection or query execution?

If it is Connection.Open, check these:
a. Network speed
b. Apart from database what all is running in the server and if that is slowing it down.
c. Is the client machine itself slow to process things?
d. Add the data source name to host file in the client and see if it helps. If it does, this should be one of the steps during installation.
f. Are you using resources correctly? Efficient use of DB connections, connection pooling etc.

If it is query, check the DB design. Are the indices correct? If it is an insert, get rid of avoidable indices from the table.
 
Share this answer
 

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