Click here to Skip to main content
15,912,204 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear All,

We have two web sites created using ASP.Net(vs2008) and sql server 2008.

We hosted these web sites in the same server. But the speed of one site is good and the other is too slow in performance.

Can any one please tell me what might be the issue?

Regards,
Posted
Comments
Herman<T>.Instance 9-Aug-11 7:30am    
what are the difference between both websites and both databases?
Raj.rcr 9-Aug-11 7:36am    
In website1, we are using sql parameters in code behind file of a page, where as in website2, we are using sql parameters function in BLL file which is referenced by the Page.. This is the only difference at the coding side.
R. Giskard Reventlov 9-Aug-11 8:18am    
Have you created appropriate indexes? Have you profiled the application? There are so many things you can or should do to ensure that a site runs at optimal speed. It would be impossible to guess what bit you have missed or got wrong without spending time looking at the apps. I would imagine that is what you are paid to do. Look on CP: there are some very good articles relating to optimisation and speed.
[no name] 9-Aug-11 9:09am    
Is loading problem in whole website or a particular page?
Raj.rcr 9-Aug-11 9:11am    
Actually we have some reports in both the web sites.. while generating the reports, it takes too much time in website2.. i.e., in all the pages.

Execute the queries in Database and use profiler to analyse it.
Analyse the ASP for round trips from server.
Also good to check if database views are used properly
 
Share this answer
 
Comments
Raj.rcr 9-Aug-11 9:08am    
In the website1, we are making use of xml and in website2, we are not using the xml.. could that be a issue?
It's impossible to tell you exactly what the problem is, however - you can definitely do some performance analysis yourself.

It sounds like the database the slow website is accessing might have some issues. Try and rule out data access as a bottle neck.

Are your queries executing well? Are all the tables indexed correctly? Perhaps run SQL profiler against the database and see if there are any slow running queries, any table scans occurring ??

Maybe run query profiler against some SQL you know is being executed. (in SQL Management Studio, put SQL in query window and choose Query -> Display Estimated Execution Plan). Look at the query plan, can you see any statistics where queries are spending a lot of time?

You need to make sure this is running as fast as possible - Bad table or ineffiecient queries will really slow down your site

If you can totally rule out the database as the culprit, then we'll move onto looking at the differences between the websites!
 
Share this answer
 
Comments
Raj.rcr 9-Aug-11 9:08am    
In the website1, we are making use of xml and in website2, we are not using the xml.. could that be a issue?
Dylan Morley 9-Aug-11 9:11am    
Possibly. How are you using XML? Are you loading a very large document?

Just to confirm, is website1 the website that is having the performance issues?
Raj.rcr 11-Aug-11 1:14am    
Hello, the following is the code written in website1:

public DataTable GetCustomer()
{
DataTable dt = null;
DataSet ds = new DataSet();
try
{
string xmlPath = "~/XMLFiles/Customer.xml";
ds.ReadXml(HttpContext.Current.Server.MapPath(xmlPath));
dt = ds.Tables[0];
}
catch
{ }
finally
{
ds = null;
}
return dt;
}

Here, we are linking xml to the database.. I hope this is the main issue in website2..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900