Hook

Claude
Their other posts in the index, biggest breakout first.
Welcome to Day 6 of teaching technical terms to non-technical vibecoders. Today's technical term is N+1 Query. Also, quick side note, query is just a technical term that a question that you ask your database and your app uses lots of queries. For example, what is user 124's first and last name? That information would be returned and is part of what's displayed on the user interface. Now that that's out of the way, what is an N+1 query and why does it kill app's performance? So an N+1 query is a query to fetch a list and then one more query per item in that list to fetch its associated data. But let's make it real with an example. So let's say you're throwing a party and you're feeding 20 people. After you've called everyone to see what type of food they like, you have a shopping list. The normal thing to do once you have the shopping list would be to go to the store, get all of your items and then come home. The N+1 query way to do that would be to go to the store, buy onions, and then drive home. Go buy garlic, and then drive home. And repeat that process for the entire shopping list. It should be pretty easy to intuit a sense that why that would be very inefficient. Don't worry, all of this is vibe codable. You can just ask either Codex or Cloud, or whatever other tool you're using to audit your application for any in-plus-one queries and just kind of fix them as it goes. Learning technical terms makes you better prompting, so follow for more.