FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » General » Database discussions » Query taking 2 minutes (Board grinds to halt for that period of time)
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Query taking 2 minutes [message #163684 is a reply to message #161949] Wed, 24 November 2010 10:34 Go to previous messageGo to previous message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma:
Senior Member
I've been trying to wrestle with this when trying to adjust the selmsg (Today's Posts / Unread posts / Message Navigator) to dislay only topics with new messages instead of all the messages.

The problem occurs when trying to "order by" and I cannot for the life of me tune it to perform better.

For example if you register a new user, read a few old posts and then hit the unread messages button found in the SHOW template, it will take a VERY long time to finish up.

I tried removing the ORDER BY and use a GROUP BY instead, and then limit it, but it doesn't work well since the ordering comes out bananas, showing several year old messages etc.

I was thinking that perhaps one could insert a timelimit, but that wont help on a busy forum with hundreds of posts per day etc.

I haven't given up completely, but until we solve this, I think the selmsg page should be disabled on new releases, it is rather easy to kill a server by doing a few calls to the message navigator or "unread" messages in selmsg.


[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Cannot connect to database
Next Topic: Has anyone tried to use this w/SQL Server 2000
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 05:32:31 GMT 2024

Total time taken to generate the page: 0.04006 seconds