My database has two tables - films has 10,000 records and reviews has 20,000 records. Whenever I try to list all the films and the
count of its reviews, MySQL locks and I have to restart the service.
Here's the SQL...
SELECT films.*, COUNT(reviews.i d)
FROM films LEFT JOIN reviews ON films.id = reviews.filmID
GROUP BY films.id
LIMIT 0, 100;
JOIN works but doesn't return records for films with no reviews. Please help!
--
StealthBanana
count of its reviews, MySQL locks and I have to restart the service.
Here's the SQL...
SELECT films.*, COUNT(reviews.i d)
FROM films LEFT JOIN reviews ON films.id = reviews.filmID
GROUP BY films.id
LIMIT 0, 100;
JOIN works but doesn't return records for films with no reviews. Please help!
--
StealthBanana
Comment