DEV Community


SDC Day 8

Timothy Nguyen
Software Engineering Graduate from Hack Reactor
・1 min read

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.

Discussion (0)

Forem Open with the Forem app