I am looking for someone who can help me fix a mysql query that is taking a high load on the server. It's from a image hosting website. I have attached the query that is taking the huge load. As you can see the query time is 31 SECONDS and its examing ALL rows on the database (163286 rows). I've also added the query within the php file.
Please see the attachment for details.