且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

VB.NET 2010 Windows窗体应用程序与SQL Server 2008的连接

更新时间:2023-02-06 22:39:19

如果导致速度减慢的SQL Server很可能问题出现在'条件'的部分>。我不是在开玩笑,因为你使用的标准是性能调优的关键。



如果查询速度很慢,你需要确保表上有适当的索引支持有限数量的行操作,例如基于键值等的更新。



由于您尚未发布实际条件,因此无法提供确切的建议,我建议熟悉不同类型的索引策略。
If it's the SQL Server that is causing the slowdown most likely the problem is in the part 'where condition'. I'm not joking since the criteria you use is the key to performance tuning.

If the queries are slow you need to ensure that you have proper indexes on the table to support limited amount of row operations such as updates based on key values etc.

Since you haven't posted the actual conditions, it's impossible to give exact proposals, but I recommend getting familiar with different kinds of indexing strategies.


老实说,没有人能为你修复它,因为你没有提供任何有用的信息。



似乎可能的原因是:

1)数据库文件*已损坏*,

2)错误配置sql server,

3)windows防火墙配置错误,

4)客户端ip协议配置错误

5)连接速度慢

6)等



请注意,当我说数据库文件是* corupted *时,我并不是说文件是物理上被破坏的,这意味着文件需要缩小 [ ^ ],索引必须改变(参见Mika的回答)等等。



我建议读这个:

监视和调整性能 [ ^ ]

配置服务器以侦听特定TCP端口(SQL Server配置管理器) [ ^ ]

为数据库引擎访问配置Windows防火墙 [ ^ ]

有关更快SQL查询的7个性能提示 [ ^ ]

第14章 - 提高SQL Server性能 [ ^ ]
To be honest, no one can fix it for you, because you did not provide any useful information.

Seems that possible reasons are:
1) database file is *corrupted*,
2) wrong configuration of sql server,
3) wrong configuration of windows firewall,
4) wrong configuration of client's ip protocol
5) connection is slow
6) etc.

Note that when i say that database file is *corupted*, i do not mean that file is physically corupted, it means that file need to be shrinked[^], indexes have to be changed (see Mika's answer), etc.

I'd suggest to read this:
Monitor and Tune for Performance[^]
Configure a Server to Listen on a Specific TCP Port (SQL Server Configuration Manager)[^]
Configure a Windows Firewall for Database Engine Access[^]
7 performance tips for faster SQL queries[^]
Chapter 14 — Improving SQL Server Performance[^]