如何提高页面性能 [英] How to increase performance of the page

查看:69
本文介绍了如何提高页面性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我有主页,一旦登录,我就会重定向到主页.
我主页我正在按以下给出的计算文字数


N个文本新状态计数总计NText个计数覆盖的百分比%
P文本新状态计数总计PText计数覆盖百分比计数
L文本新状态计数总计LText计数覆盖的百分比%

N,P,L是三个不同的表.

现在每个表中有近2000条记录

我在NP(第4个表)表中维护N和P表的关系

在NP表中,我有一个状态字段,用于计算N和P的新状态计数
链接和批准状态也在那里


我已经编写了存储过程来提高性能,但是仍然运行太慢.如果记录会增加,那么我认为它会放慢速度.

如何提高页面的性能.

谢谢

sjs4u

Hi,


I have home page where once I Logged in i am redirecting to home page.
I Home page I am calculation text count as per give below


N Text New Status Count Total NText Count % covered Count
P Text New Status Count Total PText Count % covered Count
L Text New Status Count Total LText Count % covered Count

N,P,L are three different table.

Right now there are nearly 2000 records in each table

N and P tables are in relation where i maintaing in NP(4th table) table

IN NP table I have status field where I am calculation New Status Count for N and P
Linked and Approved Status is also there


I already written store procedure for better performanance but still its running too slow. If records will get increse then i think it will slow down.

How can i increase the performanace of the page.

Thanks

sjs4u

推荐答案

如果正在等待数据库,则无法提高页面性能.

但是,您可以改善用户的页面体验.

为什么不等待数据呈现,而不是使用jQuery来调用将返回数据库操作结果的页面呢?您的页面将快速加载,并带有一个令人愉快的等待指示符,然后您将等待"面板的内容换成他们正在寻找的多汁位.

否则,寻找一种改进数据库的方法. 2000条记录不是很多数据.获得更好的硬件?使用索引.仅检索您需要的字段.请记住,如果没有优化查询,将相同的代码放入sproc并不意味着它会运行得更快.
You can''t improve the page performance if you are waiting on the database.

You can, however, improve the page experience for the user.

Instead of waiting for the data to render, why don''t you instead use jQuery to make a call to a page that will return the results of the database operations. Your page will load quickly, with a pleasant waiting indicator, and then you''ll swap out the contents of the "waiting" panel with the juicy bits they''re looking for.

Otherwise, look for a way to improve the database otherwise. 2000 records isn''t a lot of data. Get better hardware? Use indexes. Only retrieve fields you need. Remember that putting the same code in a sproc doesn''t mean it''s going to run faster if you haven''t optimized the query.


这篇关于如何提高页面性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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