I have a database with 61,000 rows. My website has a very low Google PageSpeed score due to slow server response time, so while investigating I found this SQL query takes over 1200ms to return a result:
SELECT * FROM shop_tshirts
WHERE categorie != '174868' AND shop_id = '266497' AND online='1'
GROUP BY design_id
ORDER BY tshirt_sales DESC LIMIT 0, 54
If I remove the "GROUP BY" part, the query is executed in less than 150ms
I have already added index and optimized table. What else can I do to optimise this query? Table index: http://prntscr.com/iv2nel