Log in

View Full Version : When Running Query Slows down Entire Board


atrljoe
12-11-2011, 09:08 PM
Hey everyone, when ever I run this query

SELECT threadid, title, lastpost, postusername, lastpostid, forumid, replycount, prefixid
FROM thread
WHERE thread.visible = 1
AND thread.forumid = 67
ORDER BY thread.lastpost DESC
LIMIT 5

My board slows down a lot, server loads get to 60-80, and the slow queries go off the charts. My question is what is causing this, all I am trying to do is get the last 5 threads from that forum.

Thanks

Lynne
12-11-2011, 10:47 PM
How many threads do you have on your site?

I have a query similar to that on my site and it causes no issues at all.