Re: DBA Skill tree

From: Stephane Faroult <sfaroult_at_roughsea.com>
Date: Tue, 07 Apr 2009 10:07:22 +0200
Message-ID: <49DB09BA.5000403_at_roughsea.com>



Rich,

I've been following this thread with interest, but I became utterly uncomfortable when I saw this
> Tuning SQL - starting with explain plan and ALL the functions by which
> Oracle accesses blocks, moving through the optimizer and finally newer
> features like AWR, SQL tuning sets, profiling, etc. Add to this the
> different methods by which the execution plan can be influenced -
> stats, hints, profiles/outlines, etc.

First, let me state upfront that I acknowledge that you haven't always access to the code and that dirty tricks are sometimes the only option where "real politik" is concerned.

Nevertheless, I can't agree with all this. Understanding, at least in the broad lines, how the optimizer works, and more particularly what it needs for performing well and what can lead it astray, yes, definitely. Profiling to know where time is spent, I couldn't agree more. But I've seen too many people trying to fix execution plans when the SQL code was obviously flawed in the first place, not to mention these functions that open a cursor, loop, and increase in the loop the counter they return in the end (true story; still in production. I found the code, a friend of mine forwarded it to Tom Kyte who mentioned it on his blog some time ago).

I guess we all know on this list that when something is wrong, the database is blamed, and by extension the DBA. If you consider that your job consists in silently fixing any stupid mistake, you're just turning the other cheek, which may have high moral value but is just plain wrong in this context; don't get me started on the optimizer starting to out-smart developers and rewrite everything in their back. I strongly believe that the same is true of code as of start-ups: better to fail fast than to painfully hobble (comparison with the economy also springing to mind). Influencing the execution plan is a moral hazard. Detecting what is wrong, explaining what is wrong and why it is wrong, advising what to do instead, yes. Even for 3rd party software. You won't fight entropy by tweaking parameters that nobody understands but you.

-- 
Stephane Faroult
RoughSea Ltd <http://www.roughsea.com>

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Apr 07 2009 - 03:07:22 CDT

Original text of this message