Why can I write simple queries but not joins or fix slow ones?
Your simple query works because it only asks one question of one table. A join asks you to think about two tables at once, matching rows that look nothing alike. Most people never practiced holding two ideas in their head at the same time. So the mind panics — not because the skill is hard, but because it is new. Performance problems hide underneath the query, where you cannot see them. So you guess. You copy a fix from somewhere without knowing why it worked, and the next slow query beats you again. This is not proof you are bad at this work. It means you learned the easy half and skipped the hard half. The hard half learns the same way the easy half did — one table, one join, one query, repeated until it is no longer hard.
You are not missing talent — you skipped a step. A simple query touches one table; a join forces you to hold two truths at once. Choose one join type today. Build two small tables, join them by hand, and watch every row match. Do this until it bores you.
What changes unlock by starting
- You write an inner join without hesitating.
- You read a slow query's execution plan and find the real cause.
- You stop guessing and test one change at a time.
- You trust your own queries enough to ship them without fear.