从本地到服务器的连接时间太长 [英] Connection Time is Too Long From Local To Server

查看:254
本文介绍了从本地到服务器的连接时间太长的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在项目中使用了两个数据库,一个数据库存在于本地,另一个数据库具有其他计算机(用作服务器).
我的问题是连接本地连接时间太长时. :doh:
让我知道如何快速建立连接?

请提出建议!这对我来说是最好的方法,

Theingi Win

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

推荐答案

要检查的几件事:

需要更多时间吗?打开连接还是查询执行?

如果是Connection.Open,请检查以下内容:
一个.网络速度
b.除了数据库之外,服务器中所有正在运行的服务器,如果这正在减慢它的运行速度.
C.客户端计算机本身处理事物的速度是否很慢?
d.将数据源名称添加到客户端中的主机文件,然后查看是否有帮助.如果是这样,这应该是安装过程中的步骤之一.
F.您是否正确使用资源?有效利用数据库连接,连接池等.

如果是查询,请检查数据库设计.指标正确吗?如果是插入内容,请从表中删除可避免的索引.
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.


这篇关于从本地到服务器的连接时间太长的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆