Peter,

In the perfect world you would expect the two explain plans (don't worry
about the different headings) to be identical.  Someone can probably answer
this precisely but the first one is created during the trace and the second
one is provided because you supplied the "explain=user/pass" option to
tkprof - it basically says "go back and get an explain plan for each
query".

Are you sure that both explain plans are generated using the same username
on the same instance?  Is one perhaps connecting to a different database
such as development?  In essence - if you run "sqlplus user/pass" from the
same place you ran tkprof are you connected to the exact same location as
the session that created the trace file?

Unfortunately if you are connected to the same area then I cannot help much
more.  Perhaps try taking the statement and use autotrace in sqlplus to see
which plan it provides.  Perhaps row level security of something is kicking
in and modifying the query (this caught us out once when explain plans
changed because we were connected as a different user)?

Regards,
     Mark.



                                                                                       
                                
                    "Schauss, Peter"                                                   
                                
                    <[EMAIL PROTECTED]       To:     Multiple recipients of list 
ORACLE-L <[EMAIL PROTECTED]>       
                    hgrum.com>               cc:                                       
                                
                    Sent by:                 Subject:     Interpretation of TKPROF 
output                              
                    [EMAIL PROTECTED]                                                   
                                
                                                                                       
                                
                                                                                       
                                
                    14/10/02 06:03                                                     
                                
                    Please respond to                                                  
                                
                    ORACLE-L                                                           
                                
                                                                                       
                                
                                                                                       
                                




I am running tkprof on some trace files with the following options:
(Oracle 8.1.7)

explain=<user>/<password> sort=exeqry,fchqry,execu,fchcu

Output after each query includes the following two tables:

Rows     Row Source Operation
-------  ---------------------------------------------------
     36  INLIST ITERATOR
     36   TABLE ACCESS BY INDEX ROWID PART_LIST
     72    INDEX RANGE SCAN (object id 3451)


Rows     Execution Plan
-------  ---------------------------------------------------
      0  SELECT STATEMENT   GOAL: CHOOSE
     36   TABLE ACCESS   GOAL: ANALYZED (FULL) OF 'PART_LIST'

The "Execution Plan" table corresponds to the Explain Plan section
of the Performance manual.  There is no mention, however, of the
"Row Source Operation" table.  I note particularly, that in some cases
the first table seems to agree with the second. In others, however, such as
the example here, the Row Source table shows use of an index while the
Execution Plan shows a Table Access (Full table scan?).

Am I interpreting this correctly?  If so, what is going on?

Thanks,

Peter Schauss
Northrop Grumman Corporation
[EMAIL PROTECTED]
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Schauss, Peter
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<---->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
   Privileged/Confidential information may be contained in this message.
          If you are not the addressee indicated in this message
       (or responsible for delivery of the message to such person),
            you may not copy or deliver this message to anyone.
In such case, you should destroy this message and kindly notify the sender
           by reply e-mail or by telephone on (61 3) 9612-6999.
   Please advise immediately if you or your employer does not consent to
                Internet e-mail for messages of this kind.
        Opinions, conclusions and other information in this message
              that do not relate to the official business of
                         Transurban City Link Ltd
         shall be understood as neither given nor endorsed by it.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<---->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Mark Richard
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to