RE: Semi-OT: Vi Question/Need

  • From: <Christopher.Taylor2@xxxxxxxxxxxx>
  • To: <kerry.osborne@xxxxxxxxxxx>, <tanel@xxxxxxxxxxxxxx>
  • Date: Sun, 17 Mar 2013 17:08:54 -0500

Thanks Kerry - Bruno Pier Paolo suggested using the 'BASIC' argument for plan 
stats and that worked perfectly.  I can copy the plans from different 
environments, paste in Winmerge and get a nice quick and easy diff compare.

This thread took on a life of its own after my reply to Bruno.  (THANKS to 
everyone who has responded)


Chris

-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On 
Behalf Of Kerry Osborne
Sent: Sunday, March 17, 2013 8:38 AM
To: tanel@xxxxxxxxxxxxxx
Cc: oracle-l Freelists
Subject: Re: Semi-OT: Vi Question/Need

Or you could use SQL*Plus to get what you want in the first place. (use substr 
and a few where clauses)

SYS@dbm1> l
  1  select substr(PLAN_TABLE_OUTPUT,1,73) PLAN_TABLE_OUTPUT from 
table(dbms_xplan.display_cursor('&sql_id','&child_no','typical'))
  2  where PLAN_TABLE_OUTPUT like '|%' or PLAN_TABLE_OUTPUT like 
'-------------------------------------------------------%'
  3* or PLAN_TABLE_OUTPUT like 'SQL_ID%' or PLAN_TABLE_OUTPUT like 'Plan hash 
value%'
SYS@dbm1> /
Enter value for sql_id: 1n60q90jkatjj
Enter value for child_no: 

PLAN_TABLE_OUTPUT
------------------------------------------------------------------------------------------------------------------------------------------------
SQL_ID  1n60q90jkatjj, child number 0
Plan hash value: 2886813138
-------------------------------------------------------------------------
| Id  | Operation                   | Name                      | Rows  |
-------------------------------------------------------------------------
|   0 | SELECT STATEMENT            |                           |       |
|   1 |  SORT ORDER BY              |                           |     1 |
|   2 |   NESTED LOOPS              |                           |     1 |
|   3 |    NESTED LOOPS             |                           |     1 |
|   4 |     NESTED LOOPS            |                           |     1 |
|   5 |      FIXED TABLE FULL       | X$KSLWT                   |    56 |
|*  6 |      FIXED TABLE FIXED INDEX| X$KSUSE (ind:1)           |     1 |
|*  7 |     FIXED TABLE FIXED INDEX | X$KSLED (ind:2)           |     1 |
|*  8 |    FIXED TABLE FIXED INDEX  | X$KGLCURSOR_CHILD (ind:2) |     1 |
-------------------------------------------------------------------------

15 rows selected.

Kerry Osborne
Enkitec
blog: kerryosborne.oracle-guy.com
twitter: https://twitter.com/KerryOracleGuy

--
//www.freelists.org/webpage/oracle-l


Other related posts: