Knowing When to Stop Optimising: Good Enough Versus a Capacity Problem
Optimisation has a stopping rule, and without one you will spend a week taking a query from 40 ms to 30 ms that nobody will notice. Stop when the query meets the budget the user experience needs, when the remaining time is dominated by work that must happen, or when the profile says the next win is somewhere else entirely. And know the other ending: when every query is already efficient and the system is still slow, you no longer have a query problem, you have a capacity problem, and Little's Law, not EXPLAIN, is the tool that tells you so.
Questions this Concept answers
- Why does optimisation need an explicit stopping rule?
Stop Optimizing the Wrong Things: A Data Pipeline Performance Guide
Optimising code can go on forever, so this article gives you a way to decide when to stop. It shows how to weigh how much time a change actually saves against the effort and added complexity it costs…