Received: by 10.180.94.98 with SMTP id db2mr4726034wib.2.1348692857373; Wed, 26 Sep 2012 13:54:17 -0700 (PDT) Path: q11ni67760560wiw.1!nntp.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!217.73.144.44.MISMATCH!feeder.ecngs.de!ecngs!feeder2.ecngs.de!46.4.82.166.MISMATCH!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Mladen Gogala Newsgroups: comp.databases.oracle.server Subject: Re: Oracle WTF candidate Date: Wed, 26 Sep 2012 20:54:17 +0000 (UTC) Organization: solani.org Lines: 85 Message-ID: References: Mime-Version: 1.0 X-Trace: solani.org 1348692857 30601 eJwFwQkRADAIAzBLZVA25HA8/iUsobp4XXO6cbntg2nRfBtIoVWkaiMpeEfSprvuQOsEevgBIpIRRw== (26 Sep 2012 20:54:17 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Wed, 26 Sep 2012 20:54:17 +0000 (UTC) User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) X-User-ID: eJwNxcEBwCAIA8CVREig46Qo+4/Q3ufgNHYGwcBg9pSEeznRIfeVJp7I/VhpzXta/odqbjTjAye5EVY= Cancel-Lock: sha1:+sbj1eI+DshPU20TrSjWwjwFSPM= X-NNTP-Posting-Host: eJwFwQkBwDAIA0BLPAGGnLQU/xJ2F56at5CRiI3FZxR1xfH1moEPbhukIOQzhQwP0aef0OQHCH4Qpg== Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On Wed, 26 Sep 2012 13:26:22 -0700, dombrooks wrote: > I don't think that is very fair and I don't get what is the WTF. > > Nikolay has some excellent advice on his blog and the quality of his > replies on the OTN forums are consistently good. I haven't followed his replies on the OTN forum, I'm not participating in the discussions there so I cannot comment on that. The main problem with his blog entry is in the title: "A sqlplus script for diagnosing poor SQL plans". It is essentially a script to parse the execution plan of a SQL statement. That's all there is: just the plain, old DBMS_XPLAN, nothing more. No diagnosing poor SQL plans at all, nothing that would help me discern poor plans. So bombastic of a title with such a trivial content is worthy of WTF, at least in my humble opinion. In addition to that, his script is using ALLSTATS LAST, without even mentioning plan statistics. Without the plan statistics, ALLSTATS LAST will not work: SQL> set serveroutput off; SQL> select count(*) from emp; COUNT(*) ---------- 14 Elapsed: 00:00:00.05 SQL> select * from table(dbms_xplan.display_cursor(null,null,'allstats last')); PLAN_TABLE_OUTPUT -------------------------------------------------------------------------------- SQL_ID g59vz2u4cu404, child number 0 ------------------------------------- select count(*) from emp Plan hash value: 2937609675 -------------------------------------------- | Id | Operation | Name | E-Rows | -------------------------------------------- | 0 | SELECT STATEMENT | | | | 1 | SORT AGGREGATE | | 1 | | 2 | INDEX FULL SCAN| PK_EMP | 14 | -------------------------------------------- Note ----- - Warning: basic plan statistics not available. These are only collected when : * hint 'gather_plan_statistics' is used for the statement or * parameter 'statistics_level' is set to 'ALL', at session or system leve l 20 rows selected. Elapsed: 00:00:00.57 Nothing special there, as you can see. No all important E-rows and A- rows, which is why ALLSTATS LAST was made available. I believe that so bombastic of a title, followed by such a trivial and incomplete information is worthy of the WTF status. At least, that was my reaction when I finished reading his blog entry. A question for you: what is not fair? What I find as unfair is wasting my time with such a bombastic title and then providing nothing in return. I wouldn't have read a post with a title like "how to see the execution plan of a SQL statement". Incidentally, that would be an appropriate title. This is the price to pay for unjustifiably bombastic titles: the reader will say WTF... Having said that, I wish him many good posts and replies on the OTN forum and even more good advice on his blog site. -- Mladen Gogala The Oracle Whisperer http://mgogala.byethost5.com