An Easier Explanation

The DBMS_XPLAN supplied package gives results that are so much more usable than the old “set autotrace traceonly explain”, or any manual method of reading the plan_table, that the only thing holding me back from using it more often was the lengthy syntax.

No more: I have created views to save my aching fingers. Feel free to use them, modify them, whatever for your own purposes — just don’t blame me if they break something ;)

create or replace view xplan_basic
select * from table(dbms_xplan.display(‘plan_table’,null,’BASIC’));*

create or replace view xplan_typical
select * from table(dbms_xplan.display(‘plan_table’,null,’TYPICAL’));

create or replace view xplan_parallel
select * from table(dbms_xplan.display(‘plan_table’,null,’ALL’));

create or replace view xplan_serial
select * from table(dbms_xplan.display(‘plan_table’,null,’SERIAL’));

I am now a mere “select * from xplan_parallel” away from my execution plans.

* see comment from Pete … I missed the “BASIC” parameter value in the original post.


5 thoughts on “An Easier Explanation

  1. Pete,

    Um … just testing to see if someone would catch that … take a pound from the till … erm … I’ll change it :(


    That’s handy … I’ll have to look that up anbd give it a try. thanks for the tip

  2. neil,

    the best solution for anyone would be the one that works for them … stored scripts wouldn’t work so well for me because I’d have to get them loaded on each developers machine, and I ain’t going there. Nothing to say that a developer couldn’t do that for him/her/itself of course.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s