I solved my issue! I used EXPLAIN ANALYSE in my query to show me exactly what was happening with my query. I learned that a majority of the cost was from the ORDER BY clause. I suspect this is because it is highly inefficient to sort the photos as I'm aggregating them from the photos table. Once I removed the clause and added some indexes, I got the read speed down to a millisecond! Now I just need to figure out how to add a skus object to each style similar to how I added photos.
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)