Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - High database usage
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

High database usage

 Post Reply Post Reply
Author
slepix View Drop Down
Newbie
Newbie


Joined: 30 July 2009
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote slepix Quote  Post ReplyReply Direct Link To This Post Topic: High database usage
    Posted: 30 July 2009 at 12:01pm
Hi, I am administering a sql machine, and one of my clients has webwiz forum installed. Often I can see querys running for 35-40 seconds. Query that is running that long is:

SELECT TOP 750 tblForum.Forum_ID, tblForum.Forum_name, tblForum.Password, tblForum.Forum_code, tblTopic.Topic_ID, tblTopic.Poll
tblTopic.Moved_ID, tblTopic.Subject, tblTopic.Icon, tblTopic.No_of_replies, tblTopic.No_of_views, tblTopic.Locked, tblTopic.Priority, tblTopic
tblThread.Thread_ID, tblThread.Message_date, tblThread.Message, tblThread.Author_ID, tblAuthor.Username, tblTopic.Event_date FROM
tblCategory WITH (NOLOCK) , tblForum WITH (NOLOCK) , tblTopic WITH (NOLOCK) , tblThread WITH (NOLOCK) , tblAuthor WITH (NOLO
WHERE tblCategory.Cat_ID = tblForum.Cat_ID AND tblForum.Forum_ID = tblTopic.Forum_ID AND tblTopic.Topic_ID = tblThread.Topic_ID
tblThread.Author_ID = tblAuthor.Author_ID AND tblForum.Forum_ID IN (7) AND (tblTopic.Forum_ID IN (SELECT tblPermissions.Forum_ID
FROM tblPermissions WITH (NOLOCK) WHERE (tblPermissions.Group_ID = 4 OR tblPermissions.Author_ID = 3045) AND
tblPermissions.View_Forum = 1)) AND (tblTopic.Hide = 0 OR tblThread.Author_ID = 3045) AND (tblThread.Hide=0 OR tblThread.Author_ID
3045) AND (tblThread.Message LIKE '%dac%') ORDER BY tblThread.Thread_ID DESC;


Is there any way to optimise database usage. Will the upgrade to the new version fix this problem?
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 30 July 2009 at 12:12pm
All queries in the software are optimised which is why pages take less than 0.05 seconds to process.

However the exception to this is when you run a search which as you can imagaine by it's very nature on large forums can take sometime to run as depending on the criteria the user is searching on and can take up to 60 seconds to run.

There are a number of tools to help reduce the impact of searches on performance many of which can be configured. They are listed below:-

1. Be default searches are for the last 6 months and not any date, unless the user changes this
2. Only 1 search can be carried out every 20 seconds from a particular IP

You can also edit the file search_process.asp to change the settings below:-

1. The number of topics or posts to return can be changed. By default it is 100.
2. The script timeout is set to 120 sounds
3. The database timeout is set to 60 seconds (no search query will last longer than this unless overridden on the database server)

By the look of the query you have you are using an older version which has the limit set at 750 results not 100. You should upgrade your forum to the latest release for improved performance and also to have some of the newer settings listed above.


Edited by WebWiz-Bruce - 30 July 2009 at 1:09pm
Back to Top
slepix View Drop Down
Newbie
Newbie


Joined: 30 July 2009
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote slepix Quote  Post ReplyReply Direct Link To This Post Posted: 30 July 2009 at 12:19pm
wow..this was fast :)  ok, I've reduced the number of posts to 100. I'll see how will that have the impact on the sql machine..thank you very much for your response.
Back to Top
slepix View Drop Down
Newbie
Newbie


Joined: 30 July 2009
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote slepix Quote  Post ReplyReply Direct Link To This Post Posted: 30 July 2009 at 12:24pm
one more question, forum version installed is: Web Wiz Forums version 8.02 . How complicated is the upgrade proccess, is there anything that need to have special attention when upgrading?
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 30 July 2009 at 1:08pm
Upgrading is very simple, just overwrite the existing files with the ones from the latest release and then the installation wizard takes care of the database upgrading.

For more information see the upgrade documentation at the link below:-

http://www.webwiz.net/webwizforums/kb/
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.