Oracle WTF candidate

From: Mladen Gogala <gogala.mladen_at_gmail.com>
Date: Wed, 26 Sep 2012 16:54:52 +0000 (UTC)
Message-ID: <pan.2012.09.26.16.53.49_at_gmail.com>



I was browsing through Orana when I encountered the following pearl of wisdom:

http://savvinov.com/2012/09/24/a-sqlplus-script-for-diagnosing-poor-sql- plans/

This gentleman calls himself "Oracle Diagnostician" and the title of his blog article is "A sqlplus script for diagnosing poor SQL plans". The script is very simple and the essence of it is the following statement:

select * from table(dbms_xplan.display_cursor(null, null, 'allstats last'));

That, of course, will parse only the poor SQL plans, not the rich ones. In addition to that, this statement will not do much if there isn't plan statistics. Plan statistics is, as we all know, gathered either by using GATHER_PLAN_STATISTICS hint or by setting the parameter STATISTICS_LEVEL to ALL, either on the session level or on the system level.

PS:
Now that I am a traveling DB consultant, I am thinking about starting a blog. Catching pearls of wisdom like this would be fun. I will call myself an Oracle Whisperer. I am not just a lover, I'm a leader.

-- 
Mladen Gogala
The Oracle Whisperer
http://mgogala.byethost5.com
Received on Wed Sep 26 2012 - 11:54:52 CDT

Original text of this message