Print Page | Close Window

make database process faster...

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=15092
Printed Date: 30 March 2026 at 6:55am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: make database process faster...
Posted By: kim6222
Subject: make database process faster...
Date Posted: 15 May 2005 at 7:47am
any method can make database process faster...
this is because my database is around 800kb++ n 1800 records.
 
the error message is display below:
 
 
Error Type:
Active Server Pages, ASP 0113 (0x80004005)
The maximum amount of time for a script to execute was exceeded. You can change this limit by specifying a new value for the property Server.ScriptTimeout or by changing the value in the IIS administration tools.
/ecsm/astar/1approve.asp


-------------
kim6222



Replies:
Posted By: Gullanian
Date Posted: 15 May 2005 at 8:15am
Hmmm well if it's timing out visitors aren't going to be hanging round.

You can apply general rules for database efficiency, but without seeing your code it's hard to tell if your script is utilising the database efficiently enough or not.  If it is, consider an upgrade to an SQL Server Database (I am assuming you are using Access), or if this does not help get on a better server.

Anyway, for faster database access:

  • Only call fields from the database once
    For example, don't keep doing rs("field"), when you open the record set put it in a variable then reference the variable for the rest of the script
  • Only select what you need
    Dont do SELECT * in your SQL query, select the field names you are pulling
  • Read up on SQL
    Often there are scripts using multiple recordsets and querys when infact they can sometimes be compacted into more complex single queries that are more effieicient.  Look on w3schools.com for tutorials.
  • Close your objects
    Make sure you close and drop all your database objects as soon as you don't need them
Hope this helped


Posted By: bootcom
Date Posted: 15 May 2005 at 9:16am
Another tip for you is to look into using the rs.getRows method. This is an even faster way of getting your information from the database and speeds things up even more.
 
Look in to using joins in your SQL, this way you could pull information from two (or more) database tables with one hit. I used this method when I recoded part of the forums, and placed it in the common.asp file as every page on the site needs either the forum listings and/or the forum statistics.
 
If you're new to this kind of thing I would do exactly what Gullianian suggested but when your ready to step up a notch and get a little more advanced, look in to the above methods. I did and my pages run faster than ever Clap


Posted By: Gullanian
Date Posted: 15 May 2005 at 9:25am
http://www.4guysfromrolla.com/webtech/110898-1.shtml

A few tips there, that site has loads of useful stuff


Posted By: kim6222
Date Posted: 15 May 2005 at 11:20pm
thanks...i will try now....n let your the result later....

-------------
kim6222



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net