Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - make database process faster...
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

make database process faster...

 Post Reply Post Reply
Author
kim6222 View Drop Down
Newbie
Newbie
Avatar

Joined: 22 April 2005
Location: Malaysia
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote kim6222 Quote  Post ReplyReply Direct Link To This Post Topic: make database process faster...
    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
Back to Top
Gullanian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gullanian Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
bootcom View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 February 2005
Location: United Kingdom
Status: Offline
Points: 259
Post Options Post Options   Thanks (0) Thanks(0)   Quote bootcom Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Gullanian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gullanian Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
kim6222 View Drop Down
Newbie
Newbie
Avatar

Joined: 22 April 2005
Location: Malaysia
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote kim6222 Quote  Post ReplyReply Direct Link To This Post Posted: 15 May 2005 at 11:20pm
thanks...i will try now....n let your the result later....
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.