为我的网站加速 [英] SPEED FOR MY WEBSITE

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

问题描述

你好朋友....

我正在开发一个带有来自数据库的大量数据和大量计算的Web应用程序。

我正在托管这个Web应用程序第三方服务器。现在有没有办法提高我的网络应用程序的速度,因为有很多计算,未来数据库也将是巨大的,如果有人可以帮助或建议我的东西....



提前感谢.....

Hello friends....
I am developing a web application with huge data from the database and with lot of calculations.
I am hosting this web application to a third party server. Now is there any way to increase speed for my web application because there are a lot of calculations and in future the database is also going to be huge, if anyone can help or suggest me something thn please....

thanks in advance.....

推荐答案





您可以查看以下建议:



1)在您的.net代码中有一个域缓存。理想情况下,您的应用程序应该缓存所有列从访问应用程序时第一次需要的表开始。然后从第二次开始,如果以后不需要调用数据库,它应该使用缓存的值。



2)猜猜你将拥有存储过程,查询和东西来从数据库中提取数据。在那里的战略专栏上有索引。您实际上可以使用一些SQL调优和查询执行计划来减少从查询等获取结果的时间。



3)避免重复回拨数据库。例如:如果您需要从表中搜索特定的ID,从数据库中说X,然后在Web应用程序中显示该ID的名称和地址,您实际上可以使用DataTable在您的dotnet代码中提取所需的列或一次DataSet。通过这种方式,您的Web应用程序的性能将非常好,因为对Db的重复调用正在减少。



4)广泛使用try catch块。避免重新抛出异常,尝试处理您认为可以捕获的异常。不使用时释放连接对象。



5)如果您在Web应用程序中显示地狱数据,则可能需要基于数据进行分组在某些条件下并在代码隐藏本身中编写代码。



猜猜以上步骤对你有用。



-Regards

Anurag
Hi,

You can have a look at the below suggestions:

1)Have a domain cache in your .net code.Ideally your application should cache all the columns from the tables which you need for the very first time when the application is accessed.Then from the second time onwards, it should use the cached values, if no future calls to databases are required.

2)Guess you would be having stored procedures, queries and stuffs to pull out data from your database. Have indexes on the strategic columns over there. You can actually use some SQL tuning and query execution plan to reduce the amount of time to get the result from the queries etc.

3)Avoid repeated call backs from the database. For ex: If you need to search for a particular id from a table say X from the db and then display the name and address of that id in your web app, you can actually pull out the required columns in your dotnet code by using DataTable or DataSet at once. In this way, the performance of your web app will be pretty ok since repeated calls to the Db is getting reduced.

4)Use try catch blocks extensively. Avoid rethrowing exceptions, try to handle the exceptions which you feel you can catch. Release the connection objects when they are not in use.

5)If you are displaying a hell lotta data in your web app, you might want to group the data based upon some conditions and write the code in your code-behind itself.

Guess the above steps hould work for you.

-Regards
Anurag


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

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