Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Plan_Table problem

Re: Plan_Table problem

From: Rachel Carmichael <rachel.carmichael_at_citicorp.com>
Date: 1998/04/02
Message-ID: <3523963B.4BF67D5A@citicorp.com>#1/1

kevin,

This is the script I use -- you need to specify the statement_id in the explain plan command and then retrieve using that column too.... I use TEST as the statement_id and delete from the plan_table all rows with statement_id TEST before I run the next explain plan

Rachel

select
LPAD(' ',2*Level)||Operation||' '||Options||' '||Object_Name Q_Plan
from PLAN_TABLE
where Statement_Id = 'TEST'
connect by prior ID = Parent_ID and Statement_ID = 'TEST' start with ID=0;

Kevin Bass wrote:

> I am attempting to develop a script but encountered problems testing the
> results of my sql statement. I am getting strange results using CONNECT BY
> PRIOR command. Assistance is needed!!
>
> SELECT LPAD(' ',LEVEL-1)||OPERATION||' '||OPTIONS||' '||OBJECT_NAME
> Query_plan
> FROM PLAN_TABLE
> CONNECT BY PRIOR ID = PARENT_ID
> START WITH parent_id IS NULL
> ORDER BY ID;
>
> Kevin
Received on Thu Apr 02 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US