MySQL Forums
Forum List  »  Newbie

Re: Help with a Left Join
Posted by: Brandon Rodriguez
Date: August 15, 2004 10:37PM

Still odd, when I move the games_ratings.rating>0 condition back up to the LEFT JOIN, so the query is this:

SELECT games_files.id, games_files.trackname, games_files.screenshot, games_files.user, games_files.time, AVG( games_ratings.rating ) AS average_rating
FROM games_files
LEFT JOIN games_ratings ON games_files.id = games_ratings.trackid AND games_ratings.rating >0
WHERE games_files.type =4
GROUP BY games_files.id
ORDER BY games_files.id DESC
LIMIT 10

The query's execution time is cut to 21 seconds....

Options: ReplyQuote


Subject
Written By
Posted
August 15, 2004 12:25AM
August 15, 2004 03:01AM
August 15, 2004 02:50PM
August 15, 2004 03:31PM
August 15, 2004 03:38PM
Re: Help with a Left Join
August 15, 2004 10:37PM
August 16, 2004 02:20AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.