|
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?
|