Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 Slow searching
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

guinsu
Starting Member

9 Posts

Posted - 07 May 2002 :  11:08:30  Show Profile
Search the forums at my site (forums.dealcatcher.com) is really slow when looking for terms with a lot of results like 'amazon'. I've been going through the code and trying to make changes to speed it up but I haven't had much luck. I've tried fixing some flaws in the code that actually retrieves search results, but apparently that isn't the slow part.

I've found that for every row in the table there are a number of DB lookups that seem to be slowing things down. The following are attempts I made to speed things up.

First, the SQL query around line 110 in search.asp returns duplicate records (I guess if the search term was found in a topic or in any replies). That was fixed by changing the start of the query to:

strSql = "SELECT DISTINCT " & strActivePrefix & "TOPICS.TOPIC_ID, " & strTablePrefix & "FORUM.FORUM_ID, " & strTablePrefix & "FORUM.F_SUBJECT....

I haven't found any bad side effects from doing this.

I also rolled the SQL query from line 225 into this other query. The changes are a bit long to include here, but I can clean them up and post them if anyone is interested.

These changes dropped the search time from about >30 to around 20 seconds, but that still isn't good enough. The actual search itself is really quick, does anyone have any suggestions how I can speed up all the other checking that goes into displaying the results?

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 07 May 2002 :  11:50:29  Show Profile  Visit HuwR's Homepage
look in the de discussions forum, there are some discussions on speeding up active.asp and such, the discussions would still apply to the search pages.

However, as a quick off the top of my head hint.

Most of the delays are cased by checking things like subscriptions/moderation and whether you actually have access to the post etc.

It maybe better to ascertain for instance which forums the user has access to prior to doing the query, and add an extra parameter to the query so it only returns posts for forums which you have access, this will save it cecking after wards, and maybe the same for moderated posts etc, adding them as parameters to the queery will save the asp having to do the iterations which is the slow bit.

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.35 seconds. Powered By: Snitz Forums 2000 Version 3.4.07