Performance Tuning and Time Invested
December 17, 2012 |
I never cared for the phrase "wasted time" when it comes to something like performance tuning. Sure, we all feel that way, especially when we spend hours on something only to find we were heading down the wrong rabbit hole from the start.
Instead I prefer to think of it as "invested time," as in the amount of time I just invested in learning something. Always being one for efficiency, the next question I ask is "how many hours a week do you invest in learning something?" This usually leads to a discussion with others about training, which then segues into "on-the-job" training, and before you know it we are right where we want to be: talking about the amount of time spent on performance tuning for SQL statements.
So, how much time would you estimate that would be? Don't answer just yet, start thinking about all areas of development, deployments, maintenance, production support, administration, etc. Before you know it, you might find that you spend close to 75% of your time just trying to make things go faster. That's a lot of time!
If you are going to be spending that amount of time on trying to make things go faster, then you probably want to make sure you are working as efficiently as possible. You do that by using wait events.
The idea is simple: if you know what the query is waiting for, then you remove that bottleneck and your query will run faster.