new explain plan options (dbms_xplan)

  • Published on Aug 14 2007
  • # 19
  • 10g

I still need to upgrade to 10g …

I still tend to use this old fashioned ‘set autot trace exp’
[REMI@DB01.REMIDIAN.COM]
SQL> set autotrace trace exp
[REMI@DB01.REMIDIAN.COM]
SQL> select * from dual;

Execution Plan
----------------------------------------------------------
   0      SELECT STATEMENT Optimizer=ALL_ROWS (Cost=2 Card=1 Bytes=2)
   1    0   TABLE ACCESS (FULL) OF 'DUAL' (TABLE) (Cost=2 Card=1 Bytes
          =2)



While in 10g the explain plan is pretty awseome – dbms_xplan package
[REMI@DB01.REMIDIAN.COM]
SQL> explain plan for select * from dual;

Explained.

[REMI@DB01.REMIDIAN.COM]
SQL> select * from table(dbms_xplan.display());
PLAN_TABLE_OUTPUT
----------------------------------------------------------------------------
Plan hash value: 3543395131

--------------------------------------------------------------------------
| Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
--------------------------------------------------------------------------
|   0 | SELECT STATEMENT  |      |     1 |     2 |     2   (0)| 00:00:01 |
|   1 |  TABLE ACCESS FULL| DUAL |     1 |     2 |     2   (0)| 00:00:01 |
--------------------------------------------------------------------------

8 rows selected.

[REMI@DB01.REMIDIAN.COM]
SQL> 

Leave a Reply

Helpful? - leave your note below so I can brag

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>