Stupid stupid query!!

Marc

Well-known member
Please could someone help me out here. Got a query which when run in phpmyadmin kills the server.... Need to get the info, but not sure how to optimise it more. For someone who programs with sql server every day of his life, I feel pretty stupid at the moment LOL.

SELECT
post.user_id,
post.post_id,
thread.thread_id,
thread.title AS thread_title,
thread.node_id,
node.title AS forum_title,
user.username
FROM xf_thread as thread
LEFT JOIN xf_post AS post ON post.last_post_id = post.post_id
LEFT JOIN xf_node AS node ON(node.node_id = thread.node_id)
LEFT JOIN xf_user AS user ON(user.user_id = post.user_id)
WHERE NOT ISNULL(thread.thread_id)
AND thread.discussion_state = 'visible'
ORDER BY thread.last_post_date DESC
LIMIT 10
 
Shaun your a star ....... query took 0.0006 sec LOL .... bit better than a never ending loop on insane rubbish lol

If I could 'Like' twice .... I would LOL
 
Top Bottom