Solved

Making our classic ASP website faster

Posted on 2014-02-10
8
431 Views
Last Modified: 2014-02-10
Hello,

Our application which is in classic ASP needs some housekeeping.  Either to rewrite the whole thing again in some other language preferably PHP or making the existing one faster.  In short term the later is preferred.  Hence I was looking for suggestions.

1. Our database is growing at a large pace, when we designed the site there were just 100 users and now it has grown to more than 3000.  
2.  Although The SQL queries do not take time to execute in actual MySQL interface, there is some delay when the application runs.

I want your expertise on this to suggest ways to make the existing ASP application faster.

Does  changing the  host will help?  We are on shared hosting with godaddy.

Thank you,
Amruta
0
Comment
Question by:perlwhite
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 39848565
Don't use GoDaddy for hosting.
If the SQL is working fine directly then there is no reason they wouldn't be just as fast in code.  Which should lead you to the conclusion that your ASP code is the cause of the problem. (assuming its not down to hundreds of people trying to access the site at the same time.)
0
 
LVL 32

Expert Comment

by:Big Monty
ID: 39848567
This is a pretty big question :)

Before I could offer any sound advice, it would be helpful to get a sense of what's "slow", Can you provide some basic examples of the types of pages that are slow? Are they pages that are accessing the database, or are they pages that have complex front end design and functionality?

Changing hots probably won't speed anything up, you're best bet is to try to optimize your code.

Awhile back I had built a site with a lot of queries that ran directly in my ASP code and some of them were veeerrrrrryyy slow. I switched them over to stored procedures and my page load time increased by 1000%! That may be avenue worth exploring.

Let's get some more details and maybe even a link to the site and go from there!
0
 

Author Comment

by:perlwhite
ID: 39848601
Only a couple of Admins access the site.

"Slow" here means-
The admin search for their clients by 4 filters- by Last name, Counselor, Date, and company name.

The search is only one criteria at a time.  No fancy design or flash.  Then it forms a page where it puts all the query output into a form and that pretty much it.  Also, out of all these filters, only last name output is slow.

The issue is that- all five filters use the same get query function.  Even though the query is well formed such as

select ....... from ....
where... last name= ' abc'
and firstname='ccc'

The result page display takes around 9-10 seconds to display.

Hope this helps.
0
 
LVL 58

Assisted Solution

by:Gary
Gary earned 175 total points
ID: 39848615
Try adding an index to the last name column in the db.
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 32

Accepted Solution

by:
Big Monty earned 175 total points
ID: 39848616
how many records are returned during a typical search? if you have hundreds of records being returned, you may want to look into paging

if there are a bunch of tables being joined, that can def cause it to be slow. I would recommend making the search query a stored procedure and passing in the search filters as parameters. To prove this would be faster, just run a typical search query directly in sql and see how much faster it returns data.
0
 
LVL 32

Expert Comment

by:Big Monty
ID: 39848622
the reason why I recommend the SP route is because you're now putting the processing load directly on the database server, which tend to have more power.
0
 

Author Comment

by:perlwhite
ID: 39848750
Looks like both solutions are good given by Cathal and Bigmonty
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39849000
Just to add.....

Your actual queries could should be looked at.  There are a lot of great SQL folks here.  You may want to post your sql in either MySQL or MS SQL topic.  Just some simple things like:

sql="select * from myTable where FirstName like '%"&FirstName&"%' and LastName like '%"&LastName&"'% and something like  '%"&somethingelse&"%'

Just select the fields you actual need and create you sql dynamically so you don't have to  use "likes" where you don't need to.

If you are looping through your recordset like
do unitl rs.eof
    response.write rs("lastname")&"<br>"
rs.movenext
loop

Open in new window

Throw the result into an array right away using getrows() and close your db before moving on.

If you have a big join, that is where you will want to have some other experts check you query.  There are probably some ways of working you have not thought of.

Aside from that, if you are on shared hosting, step up to vps or dedicated.  Get as much RAM as you can afford.  4 gigs is nice 8 gigs is better.  

If you can get multiple drives, consider putting your db on a SSD drive.  Just moving to a dedicated or vps hosting service where the DB is not on shared services will make a huge difference.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Syntax Help on SP 4 52
Group by correlation 4 43
Update table value with join syntax 2 46
Attaching a file to SMTP in Classic ASP 1 27
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now