Nine times out of ten this is down to a table that hasn’t been indexed properly.
Use
SHOW PROCESSLIST;
to see your MySQL processes. Check out the ‘time’ column.
To add an index use:
ALTER TABLE table
ADD INDEX product_id
(product_id
)
http://stackoverflow.com/questions/3002605/how-to-add-indexes-to-mysql-tables
and