The checklist I use for Postgres query tuning
Not magic wording, just enough context and a clear definition of done. Easy to adapt.
I am stuck on Postgres query tuning. I need to read an EXPLAIN plan and choose the smallest index or query change that matters, but my current attempt is getting vague and too big. What would you check first?
First, shrink the decision. Do not solve the whole subject at once. 1. Reproduce the failure before changing code. 2. Keep the patch smaller than the diagnosis. 3. Write the rollback before deployment. Write down the result you need by the end of this session. Then choose one input you trust and make a first pass that can be checked. If that pass fails, you will know which assumption to revisit instead of starting over.