I guess the 11g documentation is thinking of the case where something like TOAD kicks in and expects to find a real table. I think the best thing to do with utlxplan.sql is to change the code to create a GTT (and make sure it matches the one in catplan.sql!)

Yes, either they should retire utlxplan.sql or update it to reflect the changes done in the way plan_table is created.

]]>By: Charles Hooperhttps://jonathanlewis.wordpress.com/2010/01/25/old-plan_table/#comment-40219
Wed, 06 Apr 2011 19:07:06 +0000http://jonathanlewis.wordpress.com/?p=2917#comment-40219It might be interesting to see how many recently published (possibly the last 3-4 years) Oracle Database books suggest executing the utlxplan.sql script – the header of which in 11.2.0.2 shows that it was last modified May 8, 2004. At least two of the recently published books that I read in the last year suggested executing this script. It could very well be the case that developers/DBAs are just trying to follow what appears to be best practices (or so they thought until reading this blog article).
]]>By: Jonathan Lewishttps://jonathanlewis.wordpress.com/2010/01/25/old-plan_table/#comment-40218
Wed, 06 Apr 2011 12:46:56 +0000http://jonathanlewis.wordpress.com/?p=2917#comment-40218Amardeep,

I forgot to correct the note after Neil’s first comment.
The script that creates the GTT is catplan.sql – but that is part of the 10g installation run, and contains lots of other bits too. The utlxplan.sql script should have been retired by Oracle. but is still lurking, waiting to trap people.

Not sure what I am missing but here I am checking 2 systems (10.2.0.5 on AIX & 10.2.0.4 on HP-UX) and on both the systems utlxplan.sql doesn’t create a global temp table. It is just a simple create table statement. PLAN_TABLE in SYS is created as GTT, though.

Thanks,
Amardeep Sidhu

]]>By: Jithin Sarathhttps://jonathanlewis.wordpress.com/2010/01/25/old-plan_table/#comment-37300
Wed, 15 Sep 2010 05:02:53 +0000http://jonathanlewis.wordpress.com/?p=2917#comment-37300Hi Jonathan,
Your last tip was a life saver. I user the predicate information extensively when i tune SQLs and one set of my client’s instances never showed any. And naturally, it’s abig task to make them drop a few old plan_tables. So i used your workaround and wow… I have all the predicate info that I want. Thank you !!