Solved

Making our classic ASP website faster

Posted on 2014-02-10
8
451 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 33

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
Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

 
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
 
LVL 33

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 33

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

808 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