Latest Posts/Threads - optimal query?
I have 3million posts in my DB... Any suggestions on how i should do the query for "latest threads"
I currently have the following
SELECT a.title, a.lastpost, a.firstpostid, a.replycount, a.postuserid, a.forumid, a.postusername, b.title as forumname FROM vb_thread as a LEFT JOIN vb_forum as b ON a.forumid = b.forumid WHERE a.forumid != '24' ORDER BY a.threadid DESC LIMIT 7
I was actually thinking of creating a cron job that runs the above (Hourly), inserts into a temp talbe and i just pull from the sing table when i do the real query call
|