Query optimization can feel like an overwhelming task. Where to
start? In this blog post, we’ll discuss how to select which
queries you really should optimize. This is a step that’s often
skipped, but shouldn’t be! Why is selecting the right queries to
optimize so important? There are several reasons.
Penny-Wise, Pound-Foolish. Look at the forest,
not just the trees, and optimize globally, not locally. If you’re
optimizing a query that never causes a user-visible problem,
doesn’t impact other queries, and doesn’t significantly load
servers, you might be “optimizing” things that don’t matter,
spending more money than you save. Your time has value, too! Keep
in mind, too, that optimizing a query that generates only 1% of
the database’s overall load will not be a significant benefit to
the bottom line.
Whack-A-Mole Queries. It’s very common to find a
slow query in a log file, try …
[Read more]