DEV Community

Timothy Nguyen
Timothy Nguyen

Posted on

SDC Day 6

It's time to start optimizing my queries! The first thing I wanted to do was reduce my products endpoint to use a single query with the features in an array. I was able to store all the features into individual objects using json_build_object. I then used array_agg to concatenate all these objects into the same array and attach the array to the product. I then started doing the same thing to my styles endpoint but am having difficulties.

Top comments (0)