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: Database: MS SQL Server
 SQL performance problems
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 3

putimeswebmaster
New Member

67 Posts

Posted - 07 June 2002 :  17:01:36  Show Profile  Visit putimeswebmaster's Homepage
My host is claiming that our forum database is experiencing 270,000 queries per hour. Our Database is on a shared MS SQL server and they are going to shut us down soon. The number of queries seems ridiculos to me. We experience 43,000 page views per day. How many queries does the average page view create?

Pop Up Times Webmaster
http://www.popuptimes.com

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 07 June 2002 :  17:14:55  Show Profile  Send ruirib a Yahoo! Message
I know Snitz does generate a lot of queries per page, specially for default.asp and active.asp. Anyway if you have around 2,000 page views per hour, that number does look a bit huge indeed. Maybe if there's a lot of searching that can be reached, but the number looks a bit too high.

<edit>Well if you moderators constantly calling active.asp, that number can be reached. I've just checked a post by Huwr stating the sometimes for a mod as many as 4000 queries can be performed now. I'm admiting this happens with many active topics.</edit>

Maybe it's just time to find another host.<edit>I think this still applies.</edit>

-------------------------------------------------
Installation Guide | Do's and Dont's | MODs


Edited by - ruirib on 07 June 2002 17:19:40
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 07 June 2002 :  20:49:07  Show Profile  Visit Gremlin's Homepage
That number looks about right to me, Active.asp is probably the main culprit (100+ calls sometimes in that page alone). there was a good thread back in March on active.asp and how to improve that one, but for the life of me I can't find it anywhere now :( I'll post it if I end up finding it.

3.4 Should also be considerably more efficient on the DB calls.

Heres another thread to take a look at also on default.asp
http://forum.snitz.com/forum/topic.asp?TOPIC_ID=18732

www.daoc-halo.com
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 07 June 2002 :  21:26:59  Show Profile  Send ruirib a Yahoo! Message
quote:

That number looks about right to me, Active.asp is probably the main culprit (100+ calls sometimes in that page alone). there was a good thread back in March on active.asp and how to improve that one, but for the life of me I can't find it anywhere now :( I'll post it if I end up finding it.


I guess you meant this one: http://forum.snitz.com/forum/topic.asp?TOPIC_ID=24933

-------------------------------------------------
Installation Guide | Do's and Dont's | MODs
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 07 June 2002 :  23:16:33  Show Profile  Visit Gremlin's Homepage
Believe it or not I spent 20 minutes trying to find that post earlier!

Thanks heaps Ruirib :)

www.daoc-halo.com
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 08 June 2002 :  07:42:37  Show Profile  Send ruirib a Yahoo! Message
quote:

Believe it or not I spent 20 minutes trying to find that post earlier!

Thanks heaps Ruirib :)

www.daoc-halo.com


You're welcome . It was a bit easier for me, since I had bookmarked it...

-------------------------------------------------
Installation Guide | Do's and Dont's | MODs


Edited by - ruirib on 08 June 2002 07:45:28
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 09 June 2002 :  00:43:57  Show Profile  Visit Gremlin's Homepage
Cheat

www.daoc-halo.com
Go to Top of Page

putimeswebmaster
New Member

67 Posts

Posted - 11 June 2002 :  17:54:35  Show Profile  Visit putimeswebmaster's Homepage
Without reading for 4 hours, was a new active.asp ever posted?
Or any other significant performance fix?

Steve

Pop Up Times Webmaster
http://www.popuptimes.com
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 11 June 2002 :  18:32:21  Show Profile  Visit HuwR's Homepage
you can try adding clustered indexes to the forum_reply and forum_topics tables on the T_LAST_POST_DATE and R_DATE Fields respectively, I found that without these, the forums were causing page lock errors which is why people were experiencg timeout errors.


You can also try removingthe subscription checks from active.asp, as they are not really that necesary on that page

Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 11 June 2002 :  20:27:51  Show Profile  Visit Gremlin's Homepage
To save you some reading, this little gem of a change that Huwr came up with had considerable savings.

quote:

Yes, that's what I am doing to, I now have it down to 1.5 secs for a normal user, just by doing this

' Does user have access to the forum?? if cLng(Forum_ID) <> cLng(currForum) then testAllow = chkForumAccess(Forum_ID,MemberID,false) end if if testAllow then

instead of

' Does user have access to the forum?? if chkForumAccess(Forum_ID,MemberID,false) then

This reduced the number of queeries on my test from 1856 to 43




www.daoc-halo.com
Go to Top of Page

putimeswebmaster
New Member

67 Posts

Posted - 11 June 2002 :  23:02:55  Show Profile  Visit putimeswebmaster's Homepage
Forgive my ignorance Gremlin. was that change in active.asp?

Pop Up Times Webmaster
http://www.popuptimes.com
Go to Top of Page

putimeswebmaster
New Member

67 Posts

Posted - 11 June 2002 :  23:09:58  Show Profile  Visit putimeswebmaster's Homepage
I get the following error trying that code change:

Microsoft VBScript compilation error '800a03f9'

Expected 'Then'

/forum/active.asp, line 359

if cLng(Forum_ID) <> cLng
-------------------------^


Pop Up Times Webmaster
http://www.popuptimes.com
Go to Top of Page

putimeswebmaster
New Member

67 Posts

Posted - 11 June 2002 :  23:14:51  Show Profile  Visit putimeswebmaster's Homepage
Since I have subscriptions turned off, is there a way I can remove checking everywhere?

Pop Up Times Webmaster
http://www.popuptimes.com
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 11 June 2002 :  23:27:14  Show Profile  Send ruirib a Yahoo! Message
Looks line you broke the line in the wrong place. The code in red should be there:

if cLng(Forum_ID) <> cLng(currForum) then
... Here come the next lines...


-------------------------------------------------
Installation Guide | Do's and Dont's | MODs


Edited by - ruirib on 11 June 2002 23:27:38
Go to Top of Page

putimeswebmaster
New Member

67 Posts

Posted - 11 June 2002 :  23:58:53  Show Profile  Visit putimeswebmaster's Homepage
Thanks, next issue:

Microsoft VBScript runtime error '800a01c2'
Wrong number of arguments or invalid property assignment: 'chkForumAccess'

/forum/active_smk.asp, line 360


Line 360 follows
testAllow = chkForumAccess(Forum_ID,MemberID,false)

You can views the script here: http://www.popuptimes.com/forum/active_smk.asp

Pop Up Times Webmaster
http://www.popuptimes.com

Edited by - putimeswebmaster on 12 June 2002 00:00:43
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 12 June 2002 :  00:43:43  Show Profile  Visit Gremlin's Homepage
Quoting the reply seemed to lose most of the formatting sorry my fault.

It should look more like this

Replace this line

' Does user have access to the forum??
if chkForumAccess(Forum_ID,MemberID,false) then


With the following

' Does user have access to the forum??
if cLng(Forum_ID) <> cLng(currForum) then
testAllow = chkForumAccess(Forum_ID,MemberID,false)
end if
if testAllow then



www.daoc-halo.com
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Next Page
 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.22 seconds. Powered By: Snitz Forums 2000 Version 3.4.07