-boRg- wrote:
I do plan on re-writing the default.asp page for th next version to improve performance as well as a number of other pages.
The problem with changing the wfSpAuthorDesc to include TOP 1 after 'SELECT' is that your forum statistics will never show more than '1' as the total number of registered users. |
I just realized that, scratch my comment on that, although I am considering a faster query for that.
Here is the gist of what the default page does...
strSQL = "EXECUTE GetAllForumCategories"
Do While NOT rsGetAllForumCategories.EOF
'DISPLAY CATEGORY TITLE
strSQL = "EXECUTE GetForumsWhereCatIs @intCatID = " & intCatID
Do While NOT rsGetForumsWhereCatIs.EOF
'DISPLAY FORUM TITLE W/LINK
strSQL = "EXECUTE GetModerators @intForumID = " & intForumID
Do While NOT rsGetModerators.EOF
'DISPLAY MODERATORS
rsGetModerators.MoveNext
loop 'FOR NEXT MODERATOR
strSQL = "EXECUTE GetLastPostInfo @intForumID = " & intForumID
'DISPLAY LAST POST INFO
rsGetForumsWhereCatIs.MoveNext
loop 'FOR NEXT FORUM
rsGetAllForumCategories.MoveNext
loop 'FOR NEXT CATEGORY
That is quite a few nested queries that should be changed to getrows so that each recordset can be closed immediately. I pretty significant performance boost