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: Mark Powell <Mark.Powell_at_eds.com>
Date: 1998/04/02
Message-ID: <01bd5e3e$3113b3c0$a12c6394@J00679271.ddc.eds.com>#1/1

My plan_table query's where clause looks a little different:

          connect by prior id          = parent_id
          and            statement_id = 'user'
          start with    id                 = 0
          and            statement_id = 'user';

I have used " explain plan set statement_id = 'user' for" the_sql, and always execute a delete from plan_table where statement_id = 'user' in the skeleton script I pass out. We use one shared plan_table for everyone. The duplicate line above "and statement_id = 'user' " is not an error. Both statements are required or the data is duplicated on output. I hope this helps. You may want to consider adding the cost column, new with 7.3, to your select. I find it useful.

Kevin Bass <akil1_at_mindspring.com> wrote in article <6fumla$tlr_at_camel12.mindspring.com>...
> 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