Please could anyone help with the following query? (180352 rows)
SELECT COUNT(p.stock_id) AS num_products, p.master_photo, p.product_photo, p.stock_id, p.master,
Try adding an Index on stock_id in the products table... that should help.