反应慢 [英] slow response

查看:92
本文介绍了反应慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我已经在C#中开发了一个桌面应用程序,该应用程序使用Sql Server 2005 Express Edition存储数据.

数据库服务器可以在数据量较小的情况下正常工作,但是现在我在一个表中有10,000多个条目,当我从该表中获取数据时会花费很多时间.

另外,我还在此表上创建了一个视图,其中包含一些子查询.
此视图无法使用此数据大小打开,并且sql server返回超时到期"错误.

我不明白为什么服务器在如此大的数据量下却表现得如此,毕竟它是一台服务器.

我有2.8个处理器和1 GB的RAM.

如果有人知道此问题,请告诉我.

解决方案

只是因为您将其标记为服务器并不意味着它是一台.
这些天1GB的内存非常低.
没有看到您的SQL语句,我们无能为力.

查看索引.

尽可能使用INNER JOIN(而不是LEFT/RIGHT OUTER JOIN)

如果您在视图中删除了子查询,那么它是否起作用?


是的,如果我删除了子查询,但是仍然很慢,并且我也在视图中使用了内部联接,那么它可以工作.


blockquote>

Hi,


I have developed a desktop application in C# that uses Sql Server 2005 express edition to store data.

The database server works fine with small size of data, but now I have more than 10,000 entries in a table, and when I fetch data from this table it takes quite a lot of time.

Also I have created a view on this table which contains some subqueries.
This view is not opening with this data size, and sql server is returning "time out expiration" error.

I do not understand why server is behaving like this with this size of data, after all it is a server.

I have 2.8 processor with 1 GB of RAM.

If someone have knowledge about this issue please tell me.

解决方案

Just because you label it a server doesn''t mean it''s one.
1GB of ram is very very low these days.
Without seeing your SQL statements there isn''t much we can do to help.

Look into indexing.

Use INNER JOIN''s where possible (instead of LEFT / RIGHT OUTER JOIN''s)

If you take out the sub queries in the view does it work then?


Yes it works if i remove subqueries but still very slow and i am also using inner joins in the view.


这篇关于反应慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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