Fetch phase in a trace file

Oracle version: 11.2.0.3.0 Enterprise Edition
OS - IBM/AIX RISC System/6000
I am trying to generate a trace file from a piece of code executed by java server. What I asked the java developer to do is to place this block immediately after establishing a connection:
BEGIN
  EXECUTE IMMEDIATE 'ALTER SESSION SET TRACEFILE_IDENTIFIER = ''M1''';
  dbms_monitor.session_trace_enable(waits => FALSE, binds => TRUE);
END;And at the end of the logical java block of code:
BEGIN
  dbms_monitor.session_trace_disable;
END;What I want to know is how many rows the java server fetches after executing one particular select statement, because they complain about receiving less in count rows from the select statement than expecting.
For example, if I execute the same sql query in sqlplus session, then I fetch let's say 1000 rows.
When the same query is executed from java side, the fetched rows are less in count, let's say 500.
And because I doubt it, I wanted to trace to see what actually is executed and how.
From the excerpt of the trace file I see exactly the same query which I execute myself in a sqplus session.
There is no fine-grained control on the udnerlying tables in the query.
And my question is, how to interpret the FETCH phase of the cursor (for the select statement)?
For example, if I see one FETCH for this cursor, does this mean that the java server has fetched only one row?
If I see 100 FETCHes, does this mean they fetched 100 rows from the cursor?
Here is a short excerpt from the trace file (please don't crucify me for the query and the obvious denormalized design of the tables, this is not invented by me):
PARSING IN CURSOR #4573587152 len=667 dep=0 uid=737 oct=3 lid=737 tim=17685516462413 hv=954980718 ad='70000006d3e4940' sqlid='69pm96nwfrqbf'
select /* ordered */ o.id, nvl(o.par_id, -1) as par_id, o.NAME_GER, o.NAME_ENG, o.NAME_ESP, o.NAME_ITL,o.NAME_FRA, decode(lo.lflag, 'Y', 'L', 'N') as leaf_or_node, lo.distance + 1 as "LEVEL",  to_char(o.beg_date, 'DD.MM.YYYY HH24:MI:SS'),  o.mais_id, l.path, nvl(o.non_selectable, 'N')  from   st_prod o, lprod_new l, lprod lo where  o.end_date = to_date('31.12.3999', 'DD.MM.YYYY') and   (lo.id, lo.beg_date) in (select id, beg_date from st_prod where par_id is null and end_date = to_date('31.12.3999', 'DD.MM.YYYY')) and   lo.lid = o.id and lo.lid_beg_date = o.beg_date and   l.st_prod_id = o.id and l.st_prod_beg_date = o.beg_date order by lo.distance, o.name_ger
END OF STMT
PARSE #4573587152:c=31,e=152,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,plh=2027551050,tim=17685516462412
EXEC #4573587152:c=80,e=375,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,plh=2027551050,tim=17685516462936
*** 2013-03-11 11:28:09.122
FETCH #4573587152:c=519446,e=892645,p=0,cr=113446,cu=0,mis=0,r=10,dep=0,og=1,plh=2027551050,tim=17685517355715
FETCH #4573587152:c=37,e=59,p=0,cr=0,cu=0,mis=0,r=10,dep=0,og=1,plh=2027551050,tim=17685517359109
FETCH #4573587152:c=39,e=63,p=0,cr=0,cu=0,mis=0,r=10,dep=0,og=1,plh=2027551050,tim=17685517361128
FETCH #4573587152:c=29,e=46,p=0,cr=0,cu=0,mis=0,r=10,dep=0,og=1,plh=2027551050,tim=17685517362849
FETCH #4573587152:c=31,e=48,p=0,cr=0,cu=0,mis=0,r=10,dep=0,og=1,plh=2027551050,tim=17685517364621
<162 more FETCH-es here>
<STAT phase>
CLOSE #4573587152:c=533,e=849,dep=0,type=1,tim=17685517671878Is it possible based on the trace file (if I have to change something in the way of tracing) to determine how many rows were fetched?

Hi
I read the traces into a table from the client from which I log and then read from the table If you can copy the content of the table column you are reading and paste it into a file say : your_trace_name.trc file then you can use this to generate a TKPROF trace fiile
C:\>tkprof your_trace_file.trc your_trace_file.txt
TKPROF: Release 10.2.0.3.0 - Production on Mon Mar 11 15:28:13 2013
Copyright (c) 1982, 2005, Oracle.  All rights reserved.To find the arraysize you are using then use this formula
rows/Fetch = arraysizeFew details about interpreting TKRPOF exist here
http://hourim.wordpress.com/2012/09/14/tuning-by-tkprof-a-case-study/
Best regards
Mohamed Houri

Similar Messages

  • Trace file analysis: High cpu timings for FETCH

    Hi!
    I am doing a 10046 trace file analysis for a performance problem we see on a customer site, but we can't reproduce the problem on our local reference test system.
    Basically, the cpu timings for FETCH calls for a SELECT statement are ten times as high on the customer system. There are no WAIT events in the trace file (for this statement), only a high cpu timing for the FETCHES:
    Customer instance:
    FETCH #19:c=140625,e=140189,p=0,cr=3358,cu=0,mis=0,r=1,dep=1,og=1,tim=1500177409
    Reference system;
    FETCH #4:c=15625,e=7984,p=0,cr=2262,cu=0,mis=0,r=1,dep=1,og=1,tim=5624714062
    I see that the number of consistant reads is 50% higher, but I don't see why this result in 10 times the CPU time and about 20 times the elapsed time. This is does not seem to be a general problem with all statements, so the general timings are comparable to our reference system. The problem seems to be this Select statement only which only joins two tables.
    I had the idea that a long running transaction that didn't commit would lead to this problem, since Oracle would need to reconstruct blocks from undo, but there are no such transactions on the system.
    With no WAIT events emitted, where does the time go?
    Thanks for your help,
    Marcus

    MMarcus wrote:
    Here is the execution plan for the query. It is the same on both systems, with slightly different total costs (8 or 10).
    | Id  | Operation                      | Name                | Rows  | Bytes | Cost (%CPU)| Time     |                                                                                                                                                                                                      
    |   0 | SELECT STATEMENT               |                     |     1 |    35 |    10  (10)| 00:00:01 |                                                                                                                                                                                                      
    |   1 |  SORT ORDER BY                 |                     |     1 |    35 |    10  (10)| 00:00:01 |                                                                                                                                                                                                      
    |*  2 |   FILTER                       |                     |       |       |            |          |                                                                                                                                                                                                      
    |*  3 |    TABLE ACCESS BY INDEX ROWID | PLANHIERARCHIE      |     1 |    35 |     5   (0)| 00:00:01 |                                                                                                                                                                                                      
    |*  4 |     INDEX RANGE SCAN           | PLANHIERARCHIEINDEX |    21 |       |     2   (0)| 00:00:01 |                                                                                                                                                                                                      
    |   5 |    NESTED LOOPS                |                     |     1 |    39 |     4   (0)| 00:00:01 |                                                                                                                                                                                                      
    |*  6 |     TABLE ACCESS BY INDEX ROWID| PLANSCHRITTFOLGE    |     1 |    21 |     3   (0)| 00:00:01 |                                                                                                                                                                                                      
    |*  7 |      INDEX RANGE SCAN          | PLANSCHRITTFOLGEPK  |    11 |       |     2   (0)| 00:00:01 |                                                                                                                                                                                                      
    |*  8 |     TABLE ACCESS BY INDEX ROWID| PLANHIERARCHIE      |     1 |    18 |     1   (0)| 00:00:01 |                                                                                                                                                                                                      
    |*  9 |      INDEX UNIQUE SCAN         | PLANHIERARCHIEPK    |     1 |       |     0   (0)| 00:00:01 |                                                                                                                                                                                                      
    You have omitted the predicate section from the execution plan - and [+*there may be important clues*+|http://jonathanlewis.wordpress.com/2008/12/03/predicate-problems/] in the predicate section.
    In your case the problem may +(*for example*+) simply be the way in which the predicates apply to the PLANSCHRITTFOLGEPK index range scan.
    Imagine you have 250 index entries per leaf block, and the predicates that apply to the index identify an index range scan that spans 25 entries in one system but 25000 entries (100 leaf blocks) in the other. It is possible that filter predicates against the index eliminate most of the index entries before you go to the table. The CPU used to examine (filter) large numbers of index leaf entries can be significant - and since that index range scan is part of a filter subquery it could many several time - escalating the CPU usage. A check of the access and filter predicates may give you some clue about whether you are seeing that type of problem.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk
    To post code, statspack/AWR report, execution plans or trace files, start and end the section with the tag {noformat}{noformat} (lowercase, curly brackets, no spaces) so that the text appears in fixed format.
    "Science is more than a body of knowledge; it is a way of thinking"
    Carl Sagan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Not able to get the actual plan from trace file

    Hi all
    I have a Db package and want to get actual execution plan of all the statements in that pakcage it does provides the plan for System's statements but does not displays the plan for Sql statements
    DB version 9.2.0 using the following sequence of insructions
    set timing on
    set serveroutput on
    alter session set events '10046 trace name context forever ,level 12';
    begin
    run_service.collect_data(sysdate);
    end;
    alter session set sql_trace=false;
    exit; ---exit from Sql
    now look at the output
    select distinct obj#,containerobj#,pflags,xpflags,mflags
    from
    sum$, suminline$ where sumobj#=obj# and inline#=:1
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 0.00 0.00 0 0 0 0
    Fetch 1 0.00 0.00 1 1 0 0
    total 3 0.00 0.00 1 1 0 0
    Misses in library cache during parse: 0
    Optimizer goal: CHOOSE
    Parsing user id: SYS (recursive depth: 2)
    Rows Row Source Operation
    0 SORT UNIQUE
    0 NESTED LOOPS
    0 TABLE ACCESS BY INDEX ROWID SUMINLINE$
    0 INDEX RANGE SCAN I_SUMINLINE$_2 (object id 1614116)
    0 TABLE ACCESS BY INDEX ROWID SUM$
    0 INDEX UNIQUE SCAN I_SUM$_1 (object id 319)
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    db file sequential read 1 0.00 0.00
    SELECT SEQ_NUM, S_DATE, S_TIME, CSTATUS, G_SERVICE,
    B_REFERENCE, V_REFERENCE, M_PRIORITY
    FROM GL_HIST
    ORDER BY S_DATE DESC, S_TIME DESC
    call count cpu elapsed disk query current rows
    Parse 1 0.01 0.01 0 0 0 0
    Execute 2819 0.37 0.32 0 0 0 0
    Fetch 2819 2.50 20.47 2786 20164 0 2819
    total 5639 2.88 20.81 2786 20164 0 2819
    Misses in library cache during parse: 1
    Optimizer goal: CHOOSE
    Parsing user id: 15550 (recursive depth: 1)
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    db file sequential read 2786 0.05 18.19
    latch free 4 0.04 0.06
    UPDATE G_ORIG SET G_SERVICE = :B1
    WHERE
    SEQ_NUM = :B5 AND S_DATE = :B4 AND S_TIME = :B3 AND
    C_STATUS = :B2 AND NVL(G_SERVICE, '+') <> NVL(:B1, '+')
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.03 0 0 0 0
    Execute 3731 0.74 0.99 261 18712 119 54
    Fetch 0 0.00 0.00 0 0 0 0
    total 3732 0.74 1.02 261 18712 119 54
    Misses in library cache during parse: 1
    Optimizer goal: CHOOSE
    Parsing user id: 15550 (recursive depth: 1)
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    db file sequential read 261 0.01 0.19
    latch free 9 0.01 0.04
    COMMIT

    Remove the line alter session set sql_trace=false and just exit/disconnect. The explain plain is contained in the STAT lines in the trace file and are only written when the cursor closes. If you turn off tracing before the cursor closes the STAT lines will not get written.

  • No trace file in .../udump

    Hi,
    DB 10.2.0.5
    I enabled a session tarce by :
    execute sys.dbms_system.set_sql_trace_in_session(267,21842,TRUE); (that's the J011 process)
    and can see it in v$session:
    SQL> select sid, serial#, sql_trace, sql_trace_waits, sql_trace_binds from v$session where sid=267;
    SID SERIAL# SQL_TRAC SQL_T SQL_T
    267 21842 ENABLED TRUE TRUE
    but there is no trace file written to the udump dir?
    br
    Daniel

    Daniel,
    The dbms_system package is an undocumented , internal-only package. Please don't use it. Instead of it, use dbms_monitor package to do the same task.
    edit
    If you are still interested to use this package only , do some activity in the session. See below,
    SQL> grant dba to aman identified by aman;
    Grant succeeded.
    SQL> cl scr
    SQL> exit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, Automatic Storage Management, OLAP, Data Mining
    and Real Application Testing options
    [oracle@edbar2p0-orcl ~]$ sqlplus aman/aman
    SQL*Plus: Release 11.2.0.1.0 Production on Mon Jul 11 17:00:34 2011
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, Automatic Storage Management, OLAP, Data Mining
    and Real Application Testing options
    SQL> select sid, serial# from V$session where username='AMAN';
           SID    SERIAL#
            31        353
    SQL> execute sys.dbms_system.set_sql_trace_in_session(31,353,TRUE);
    BEGIN sys.dbms_system.set_sql_trace_in_session(31,353,TRUE); END;
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00201: identifier 'SYS.DBMS_SYSTEM' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    SQL> conn / as sysdba
    Connected.
    SQL> grant execute on dbms_system to aman;
    Grant succeeded.
    SQL> cl scr
    SQL> conn aman/aman
    Connected.
    SQL> select sid, serial# from V$session where username='AMAN';
           SID    SERIAL#
            31        357
    SQL> alter session set tracefile_identifier='aman';
    Session altered.
    SQL> execute sys.dbms_system.set_sql_trace_in_session(31,357,TRUE);
    PL/SQL procedure successfully completed.
    SQL> select sid, serial#, sql_trace, sql_trace_waits, sql_trace_binds from v$session where sid=31;
           SID    SERIAL# SQL_TRAC SQL_T SQL_T
            31        357 ENABLED  FALSE FALSEAfter this, I checked in the diag folder, there is no control file created.
    [oracle@edbar2p0-orcl trace]$ ls *aman*
    ls: *aman*: No such file or directory
    [oracle@edbar2p0-orcl trace]$ Now, I just ran some queries in the session.
    SQL> select * from scott.emp;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM
        DEPTNO
          7369 SMITH      CLERK           7902 17-DEC-80        800
            20
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300
            30
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500
            30
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM
        DEPTNO
          7566 JONES      MANAGER         7839 02-APR-81       2975
            20
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400
            30
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850
            30
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM
        DEPTNO
          7782 CLARK      MANAGER         7839 09-JUN-81       2450
            10
          7788 SCOTT      ANALYST         7566 19-APR-87       3000
            20
          7839 KING       PRESIDENT            17-NOV-81       5000
            10
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM
        DEPTNO
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0
            30
          7876 ADAMS      CLERK           7788 23-MAY-87       1100
            20
          7900 JAMES      CLERK           7698 03-DEC-81        950
            30
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM
        DEPTNO
          7902 FORD       ANALYST         7566 03-DEC-81       3000
            20
          7934 MILLER     CLERK           7782 23-JAN-82       1300
            10
    14 rows selected.After doing this, I checked again ,
    [oracle@edbar2p0-orcl trace]$ ls *aman*
    orcl_ora_9828_aman.trc  orcl_ora_9828_aman.trm
    [oracle@edbar2p0-orcl trace]$
    PARSING IN CURSOR #3 len=23 dep=0 uid=93 oct=3 lid=93 tim=1310404033551285 hv=52
    404428 ad='32ab2004' sqlid='ggqns3c1jz86c'
    select * from scott.emp
    END OF STMT
    PARSE #3:c=1000,e=1903,p=1,cr=24,cu=0,mis=1,r=0,dep=0,og=1,plh=3956160932,tim=13
    10404033551284
    EXEC #3:c=0,e=10,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,plh=3956160932,tim=131040403
    3551335
    FETCH #3:c=0,e=266,p=6,cr=7,cu=0,mis=0,r=1,dep=0,og=1,plh=3956160932,tim=1310404
    033551649
    FETCH #3:c=0,e=19,p=0,cr=1,cu=0,mis=0,r=13,dep=0,og=1,plh=3956160932,tim=1310404
    033551860
    STAT #3 id=1 cnt=14 pid=0 pos=1 obj=73181 op='TABLE ACCESS FULL EMP (cr=8 pr=6 p
    w=0 time=0 us cost=3 size=532 card=14)'HTH
    Aman....
    Edited by: Aman.... on Jul 11, 2011 5:08 PM
    added Edit

  • Memory Dump for Bind Variable included in 10046 trace file

    A curious thing I've seen today. While looking through an extended Oracle Trace file, I see the following:
    =====================
    PARSING IN CURSOR #26 len=88 dep=0 uid=28 oct=6 lid=28 tim=2667421262 hv=3259943383 ad='4bbb4ad8'
    UPDATE V_QRTZ_TRIGGERS SET JOB_DATA = :1 WHERE TRIGGER_NAME = :2 AND TRIGGER_GROUP = :3
    END OF STMT
    PARSE #26:c=0,e=54,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,tim=2667421260
    BINDS #26:
    bind 0: dty=113 mxl=3876(3876) mal=00 scl=00 pre=00 oacflg=03 oacfl2=0 size=3876 offset=0
    bfp=0cd99aa4 bln=3876 avl=86 flg=05
    value=
    Dump of memory from 0x0CD99AA4 to 0x0CD99AFA
    *CD99AA0          01005400 00002C01 00000100      [.T...,......]*
    *CD99AB0 00000100 EB23EF03 581D0000 571D0000  [......#....X...W]*
    *CD99AC0 0F000F00 00000000 0F005920 0E14E12F  [........ Y../...]*
    *CD99AD0 CDE21ADA 00000000 737E06D9 0400FB09  [..........~s....]*
    *CD99AE0 07000F00 800387E6 A17B3F20 0000000E  [........ ?{.....]*
    *CD99AF0 571D0000 EE56CF00 00001500           [...W..V.....]*
    bind 1: dty=1 mxl=128(45) mal=00 scl=00 pre=00 oacflg=03 oacfl2=10 size=256 offset=0
    bfp=0cd99984 bln=128 avl=15 flg=05
    value="EC-MHM Retrieve"
    bind 2: dty=1 mxl=128(96) mal=00 scl=00 pre=00 oacflg=03 oacfl2=10 size=0 offset=128
    bfp=0cd99a04 bln=128 avl=32 flg=01
    value="2BBDE87AF15D4B5E867AB6482D7D58C8"
    BINDS #9:
    bind 0: dty=1 mxl=32(18) mal=00 scl=00 pre=00 oacflg=03 oacfl2=1 size=192 offset=0
    bfp=0c2de90c bln=32 avl=18 flg=05
    value="EC_SCHEDULE_PIN_TO"
    bind 1: dty=1 mxl=128(15) mal=00 scl=00 pre=00 oacflg=13 oacfl2=1 size=0 offset=32
    bfp=0c2de92c bln=128 avl=15 flg=01
    value="EC-MHM Retrieve"
    bind 2: dty=1 mxl=32(32) mal=00 scl=00 pre=00 oacflg=13 oacfl2=1 size=0 offset=160
    bfp=0c2de9ac bln=32 avl=32 flg=01
    value="2BBDE87AF15D4B5E867AB6482D7D58C8"
    EXEC #9:c=15625,e=1060,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=1,tim=2667424863
    FETCH #9:c=0,e=95,p=0,cr=4,cu=0,mis=0,r=1,dep=1,og=1,tim=2667425091
    FETCH #9:c=0,e=1,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=0,tim=2667425236
    Is this normal and is it caused by size of Bind Variable?
    Kind regards,
    TRONd

    It's normal and and happens due to bind variable datatype. In your case this is blob, (there are a couple of other datatypes - timestamp among other) which will be represented that way in the trace file.
    Best regards
    Maxim

  • Do you know Timmings for trace files generated?

    Hi,
    I have done some sql traceing using DBMS_MONITOR package.
    We can also enable SQL traceing using DBMS_SESSION.
    I want to generate sql trace file for "particuler part of application".
    When i did that i got some sql trace files,, now that "particuler part of application" was over application was idle..
    but as time goes these files are still populating in size means they are still sql traceing going on...
    My question is when and how trace files are generated?
    Do you have idea???
    Thanks and Regards,
    Rushang Kansara
    Message was edited by:
    Rush

    also what content of my sql trace file should i
    consider for exacly tracing that "particuler part of
    application".
    Rushang
    Parse Count To Execute Ratio
    Take the numbers of parse count and divide it by numbers of time execute count if it is 1 then it means you are parsing the same statment everytime,If this ratio is 1 then it will latch the shared SQL area which will degrade the overall performance.Like if you execute a query which is using bind variable and this query is at yours front end level trigger (Forms) POST_QUERY then it will show you (parse count=execute count) which shows you are parsing for every triggering event which is bad ,for that you should put this seqeuel within PL/SQL procedure which cache the cursor and will turn in (parse count<Execute Count).
    Large Diffrence Between Elasped Time And CPU Time
    If this diffrence (Elapsed time[b]-CPU time)>1 then it means you are spending yours time in for waiting resources this waiting resources will in turn wait events e.g some one updated the row and dont realease by COMMIT or ROLBACK and the same span of time you want to update then you will see a lock in tkprof result in wait event section.If you read the data from hard disk (as first time you issue it reads from HD and then put into buffer cache during this reading a latch is grabed and will not let you read this data until you perform the alls read from HD to buffer cache this will also show you in wait events which is cache buffers chain
    Fetch Calls
    If yours Fetch calls=Rows then it means you are not using Bulk fetch and yours this code will take a lot of roundtrips which will in turn jam the network.
    Disk Count
    If every time yours disk count=current + query mode then you are reading alls block from disk alls the time ,usually oracle read once from disk and put it into SGA and should be found in SGA second time.
    And there is many more...depend on yors environemnt setup but above are common.
    As you said its reproducing the tkprof again and again ,make sure you terminate the session or you explicitly turn off the tracer by
    ALTER SESSION SET SQL_TRACE=FALSE Khurram

  • SQL Query taking longer time as seen from Trace file

    Below Query Execution timings:
    Any help will be benefitial as its affecting business needs.
    SELECT MATERIAL_DETAIL_ID
    FROM
    GME_MATERIAL_DETAILS WHERE BATCH_ID = :B1 FOR UPDATE OF ACTUAL_QTY NOWAIT
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.70 0 0 0 0
    Execute 2256 8100.00 24033.51 627 12298 31739 0
    Fetch 2256 900.00 949.82 0 12187 0 30547
    total 4513 9000.00 24984.03 627 24485 31739 30547
    Thanks and Regards

    Thanks Buddy.
    Data Collected from Trace file:
    SELECT STEP_CLOSE_DATE
    FROM
    GME_BATCH_STEPS WHERE BATCH_ID
    IN (SELECT
    DISTINCT BATCH_ID FROM
    GME_MATERIAL_DETAILS START WITH BATCH_ID = :B2 CONNECT BY PRIOR PHANTOM_ID=BATCH_ID)
    AND NVL(STEP_CLOSE_DATE, :B1) > :B1
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.54 0 0 0 0
    Execute 2256 800.00 1120.32 0 0 0 0
    Fetch 2256 9100.00 13551.45 396 77718 0 0
    total 4513 9900.00 14672.31 396 77718 0 0
    Misses in library cache during parse: 0
    Optimizer goal: CHOOSE
    Parsing user id: 66 (recursive depth: 1)
    Rows Row Source Operation
    0 TABLE ACCESS BY INDEX ROWID GME_BATCH_STEPS
    13160 NESTED LOOPS
    6518 VIEW
    6518 SORT UNIQUE
    53736 CONNECT BY WITH FILTERING
    30547 NESTED LOOPS
    30547 INDEX RANGE SCAN GME_MATERIAL_DETAILS_U1 (object id 146151)
    30547 TABLE ACCESS BY USER ROWID GME_MATERIAL_DETAILS
    23189 NESTED LOOPS
    53736 BUFFER SORT
    53736 CONNECT BY PUMP
    23189 TABLE ACCESS BY INDEX ROWID GME_MATERIAL_DETAILS
    23189 INDEX RANGE SCAN GME_MATERIAL_DETAILS_U1 (object id 146151)
    4386 INDEX RANGE SCAN GME_BATCH_STEPS_U1 (object id 146144)
    In the Package there are lots of SQL Statements using CONNECT BY CLAUSE.
    Does the use of CONNECT BY Clause degrades performance?
    As you can see the Rows Section is 0 but the Query and elapsed time is taking longer
    Regards

  • Lost time in trace file

    There is anonimous block:
    begin
      execute immediate 'alter session set tracefile_identifier = ''TS'''; 
      dbms_monitor.session_trace_enable;
      some_proc(true);
    end;Procedure some_proc consists following code
    loop
      select val into i from a where par = 'Bar';
      if i = 'EXIT' then
        exit;
      end if;
      for cur in (select fld from t order by r) loop
        processing(cur);
      end loop;
    end loop;Tables A and t is very small tables. So table t is empty.
    As you can see, expected than will be works loop and select from very small table.
    I have executed the block, and it works about 477 seconds.
       select value
      2      from v$sesstat s
      3   natural
      4      join v$statname n
      5     where sid = sys_context('USERENV', 'SID')
      6       and name = 'CPU used by this session';
         VALUE
             2
    declare
      2    t date;
      3  begin
      4    execute immediate 'alter session set tracefile_identifier = ''TS''';
      5    dbms_monitor.session_trace_enable;
      6    come_proc(true);
      7  end;
      8  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:07:57.63
       select value
      2      from v$sesstat s
      3   natural
      4      join v$statname n
      5     where sid = sys_context('USERENV', 'SID')
      6       and name = 'CPU used by this session';
         VALUE
         45175But there is some strange moments:
    1. In tkprof report shows only 277.83 sec (whereas statistic "CPU usage" above is different and more appropriate, 451.75 sec.)
    declare
      t date;
    begin
      execute immediate 'alter session set tracefile_identifier = ''TS''';
      dbms_monitor.session_trace_enable;
      some_proc(true);
    end;
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        0      0.00       0.00          0          0          0           0
    Execute      1    260.95     277.83          0         64          0           1
    Fetch        0      0.00       0.00          0          0          0           0
    total        1    260.95     277.83          0         64          0           1
    Misses in library cache during parse: 0
    Misses in library cache during execute: 1
    Optimizer mode: FIRST_ROWS
    Parsing user id: 10757 
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                       1        0.00          0.00
      SQL*Net message from client                     1       20.64         20.64
    SELECT VAL
    FROM
    A WHERE PAR = 'BAR'
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.01       0.00          0          0          0           0
    Execute 1782640     29.01      28.20          0          0          0           0
    Fetch   1782640     32.78      31.77          0    5347922          0     1782640
    total   3565281     61.80      59.97          0    5347922          0     1782640
    Misses in library cache during parse: 1
    Optimizer mode: FIRST_ROWS
    Parsing user id: 43     (recursive depth: 1)
    Rows     Row Source Operation
    1782640  INDEX RANGE SCAN A_UI (cr=5347922 pr=0 pw=0 time=31762812 us)(object id 530778)
    SELECT FLD
    FROM
    T ORDER BY R
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.01       0.01          0          0          0           0
    Execute 1782639     33.21      31.91          0          0          0           0
    Fetch   1782639     95.52      95.82          0   12478473          0           0
    total   3565279    128.74     127.75          0   12478473          0           0
    Misses in library cache during parse: 1
    Optimizer mode: FIRST_ROWS
    Parsing user id: 43     (recursive depth: 1)
    Rows     Row Source Operation
          0  SORT ORDER BY (cr=12478473 pr=0 pw=0 time=103178656 us)
          0   PARTITION RANGE SINGLE PARTITION: 1 1 (cr=12478473 pr=0 pw=0 time=92028737 us)
          0    TABLE ACCESS FULL T PARTITION: 1 1 (cr=12478473 pr=0 pw=0 time=86376673 us)2. In raw trace very many rows with c=0. And somtimes there is rows with c=1000
    EXEC #9:c=0,e=13,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=2,tim=5857451912283
    FETCH #9:c=0,e=42,p=0,cr=7,cu=0,mis=0,r=0,dep=1,og=2,tim=5857451912345
    EXEC #8:c=0,e=12,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=2,tim=5857451912395
    FETCH #8:c=0,e=13,p=0,cr=3,cu=0,mis=0,r=1,dep=1,og=2,tim=5857451912427
    EXEC #9:c=0,e=14,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=2,tim=5857451912475
    FETCH #9:c=0,e=37,p=0,cr=7,cu=0,mis=0,r=0,dep=1,og=2,tim=5857451912534
    EXEC #8:c=0,e=11,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=2,tim=5857451912580
    FETCH #8:c=0,e=12,p=0,cr=3,cu=0,mis=0,r=1,dep=1,og=2,tim=5857451912612
    EXEC #9:c=0,e=13,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=2,tim=5857451912659
    FETCH #9:c=0,e=39,p=0,cr=7,cu=0,mis=0,r=0,dep=1,og=2,tim=5857451912718
    EXEC #8:c=0,e=16,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=2,tim=5857451912807
    FETCH #8:c=0,e=14,p=0,cr=3,cu=0,mis=0,r=1,dep=1,og=2,tim=5857451912865
    EXEC #9:c=0,e=14,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=2,tim=5857451912916
    FETCH #9:c=0,e=46,p=0,cr=7,cu=0,mis=0,r=0,dep=1,og=2,tim=5857451912982
    EXEC #8:c=0,e=12,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=2,tim=5857451913040
    FETCH #8:c=0,e=13,p=0,cr=3,cu=0,mis=0,r=1,dep=1,og=2,tim=5857451913148
    EXEC #9:c=0,e=14,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=2,tim=5857451913197
    FETCH #9:c=0,e=40,p=0,cr=7,cu=0,mis=0,r=0,dep=1,og=2,tim=5857451913256
    EXEC #8:c=0,e=11,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=2,tim=5857451913302
    FETCH #8:c=0,e=12,p=0,cr=3,cu=0,mis=0,r=1,dep=1,og=2,tim=5857451913334
    EXEC #9:c=0,e=14,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=2,tim=5857451913381
    FETCH #9:c=0,e=39,p=0,cr=7,cu=0,mis=0,r=0,dep=1,og=2,tim=5857451913440
    EXEC #8:c=0,e=12,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=2,tim=5857451913487
    FETCH #8:c=0,e=19,p=0,cr=3,cu=0,mis=0,r=1,dep=1,og=2,tim=5857451913525
    EXEC #9:c=0,e=18,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=2,tim=5857451913590
    FETCH #9:c=0,e=36,p=0,cr=7,cu=0,mis=0,r=0,dep=1,og=2,tim=5857451913661
    EXEC #8:c=10000,e=12,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=2,tim=5857451913710
    FETCH #8:c=0,e=13,p=0,cr=3,cu=0,mis=0,r=1,dep=1,og=2,tim=5857451913742
    EXEC #9:c=0,e=13,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=2,tim=5857451913790
    FETCH #9:c=0,e=37,p=0,cr=7,cu=0,mis=0,r=0,dep=1,og=2,tim=5857451913846
    EXEC #8:c=0,e=11,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=2,tim=5857451913893
    FETCH #8:c=0,e=12,p=0,cr=3,cu=0,mis=0,r=1,dep=1,og=2,tim=5857451913924
    EXEC #9:c=0,e=18,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=2,tim=5857451913996
    FETCH #9:c=0,e=51,p=0,cr=7,cu=0,mis=0,r=0,dep=1,og=2,tim=5857451914077
    EXEC #8:c=0,e=18,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=2,tim=5857451914149
    FETCH #8:c=0,e=17,p=0,cr=3,cu=0,mis=0,r=1,dep=1,og=2,tim=5857451914207
    EXEC #9:c=0,e=14,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=2,tim=5857451914284
    FETCH #9:c=0,e=37,p=0,cr=7,cu=0,mis=0,r=0,dep=1,og=2,tim=5857451914347Questions:
    1. How do you think, lost time is time spent
    a. in PLSQL engine during context switch,
    b. or lost time is time spent in SQL processing where CPU time is less than minimum accurancy (0.01s)
    c. or time lost during write in trace file (trace overhead)?
    2. Value c=10000 is accumulated value? I think no, may be I am wrong?
    But if I right, and time of processing was smaller than 0.01s, CPU time in tkprof will equal to zero, right?
    And from this point of view, strange that CPU time and elapsed time is near.
    3. Write in trace file is included into "elapsed time" in tracefile steps, e.g. "execute" and "fetch"?
    In other words I want more deeply understand process of SQL processing and trace.

    What version of Oracle are you using?
    Can you post the entire contents of the trace file?

  • Trace files showing bind variables value=""

    10g on solaris
    Hi All,
    We have an issue with an informatica workflow issuing an update statment to Oracle in trems of performace.
    I switched the tracing on using DBMS_SUPPORT with binds set to TRUE. It has captured the trace files accordingly against a controlled set of data. Twot trace files were produced.
    The first trace files shows the SELECT statment being issues that identifies the records that will be updated.
    The 2nd trace file shows the actual UPDATE statment being issued as a PL/SQL loop to do the update.
    There were 20 records that the users have rigged to updated and the update statment shows 20 cases where updates took place. All updates took place succesfully after checking the post results. However my issue is why the trace files are showing the bind vaules as being set to ""?..any ideas appreciated!
    an extract of the trace file...
    PARSING IN CURSOR #1 len=123 dep=0 uid=1482 oct=6 lid=1482 tim=994827916280 hv=3649357857 ad='8b5b98f0'
    UPDATE /*+ index(FCT_TASK IDX_FCT_TASK_CASE_SBL_ROW_ID)*/ FCT_TASK SET DWH_LAST_UPD_DT = SYSDATE WHERE CASE_SBL_ROW_ID = :1
    END OF STMT
    PARSE #1:c=10000,e=980,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=1,tim=994827916264
    =====================
    PARSING IN CURSOR #5 len=227 dep=1 uid=0 oct=3 lid=0 tim=994827919231 hv=2190775527 ad='8e622670'
    select u.name,o.name, t.update$, t.insert$, t.delete$, t.enabled from obj$ o,user$ u,trigger$ t where t.baseobject=:1 and t.obj#=o.obj# and o.owner#=u.user# and bitand(property,16)=0 and bitand(property,8
    )=0 order by o.obj#
    END OF STMT
    PARSE #5:c=0,e=1310,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=1,tim=994827919223
    BINDS #5:
    bind 0: dty=2 mxl=22(22) mal=00 scl=00 pre=00 oacflg=00 oacfl2=0001 size=24 offset=0
    bfp=ffffffff7c058d98 bln=22 avl=04 flg=05
    value=425212
    EXEC #5:c=10000,e=9476,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=4,tim=994827928883
    FETCH #5:c=0,e=104,p=0,cr=1,cu=0,mis=0,r=0,dep=1,og=4,tim=994827929051
    STAT #5 id=1 cnt=0 pid=0 pos=1 obj=0 op='SORT ORDER BY (cr=1 pr=0 pw=0 time=172 us)'
    STAT #5 id=2 cnt=0 pid=1 pos=1 obj=0 op='NESTED LOOPS (cr=1 pr=0 pw=0 time=110 us)'
    STAT #5 id=3 cnt=0 pid=2 pos=1 obj=0 op='NESTED LOOPS (cr=1 pr=0 pw=0 time=105 us)'
    STAT #5 id=4 cnt=0 pid=3 pos=1 obj=79 op='TABLE ACCESS BY INDEX ROWID TRIGGER$ (cr=1 pr=0 pw=0 time=103 us)'
    STAT #5 id=5 cnt=0 pid=4 pos=1 obj=123 op='INDEX RANGE SCAN I_TRIGGER1 (cr=1 pr=0 pw=0 time=78 us)'
    STAT #5 id=6 cnt=0 pid=3 pos=2 obj=18 op='TABLE ACCESS BY INDEX ROWID OBJ$ (cr=0 pr=0 pw=0 time=0 us)'
    STAT #5 id=7 cnt=0 pid=6 pos=1 obj=36 op='INDEX UNIQUE SCAN I_OBJ1 (cr=0 pr=0 pw=0 time=0 us)'
    STAT #5 id=8 cnt=0 pid=2 pos=2 obj=22 op='TABLE ACCESS CLUSTER USER$ (cr=0 pr=0 pw=0 time=0 us)'
    STAT #5 id=9 cnt=0 pid=8 pos=1 obj=11 op='INDEX UNIQUE SCAN I_USER# (cr=0 pr=0 pw=0 time=0 us)'
    BINDS #1:
    bind 0: dty=1 mxl=32(30) mal=00 scl=00 pre=00 oacflg=01 oacfl2=800000 size=32 offset=0
    bfp=ffffffff7c17b0a0 bln=32 avl=04 flg=05
    value=""
    EXEC #1:c=8390000,e=8740989,p=55593,cr=55610,cu=3,mis=1,r=1,dep=0,og=1,tim=994836657483
    BINDS #1:
    bind 0: dty=1 mxl=32(30) mal=00 scl=00 pre=00 oacflg=01 oacfl2=800000 size=32 offset=0
    bfp=ffffffff7c17b0a0 bln=32 avl=04 flg=05
    value=""
    EXEC #1:c=7980000,e=7962369,p=55591,cr=55608,cu=1,mis=0,r=1,dep=0,og=1,tim=994844621479
    BINDS #1:
    bind 0: dty=1 mxl=32(30) mal=00 scl=00 pre=00 oacflg=01 oacfl2=800000 size=32 offset=0
    bfp=ffffffff7c17b0a0 bln=32 avl=04 flg=05
    value=""
    ect ect ect...
    Regards
    Satnam

    spliffer wrote:
    Having investigated on the comment of NVARCHAR2 not allowing bind variables to be displayed in the trace file... I checked the datatype of the table/column being used in the index and its is defined as VARCHAR2(15)... ? so Im still not sure as to why we are still getting this.. could it be to do with the clinet application and the way in which it passes the bind vlaues to the oracle update statment?
    any ideas appreciated?
    regards
    SatnamHere is a very brief demonstration.
    The script:
    VARIABLE V1 VARCHAR2
    VARIABLE V2 NVARCHAR2
    EXEC :V1:='A'
    EXEC :V2:='A'
    ALTER SESSION SET TRACEFILE_IDENTIFIER = 'FIND_ME';
    ALTER SESSION SET EVENTS '10046 TRACE NAME CONTEXT FOREVER, LEVEL 12';
    SELECT
    FROM
      (SELECT
        ROWNUM COUNTER,
        CHR(MOD(ROWNUM-1,26)+65) CHARACTER
      FROM
        DUAL
      CONNECT BY
        LEVEL<=100)
    WHERE
      CHARACTER= :V1;
    SELECT
    FROM
      (SELECT
        ROWNUM COUNTER,
        CHR(MOD(ROWNUM-1,26)+65) CHARACTER
      FROM
        DUAL
      CONNECT BY
        LEVEL<=100)
    WHERE
      CHARACTER= :V2;
    SELECT SYSDATE FROM DUAL;
    ALTER SESSION SET EVENTS '10046 TRACE NAME CONTEXT OFF';In the script we have two bind variables defined, the first a VARCHAR2 and the second a NVARCHAR2. The output of the script looks like this in both cases:
       COUNTER C
             1 A
            27 A
            53 A
            79 AThe 10046 trace file looks like this:
    PARSING IN CURSOR #3 len=152 dep=0 uid=31 oct=3 lid=31 tim=2874162497 hv=2898495116 ad='a5259590'
    SELECT
    FROM
      (SELECT
        ROWNUM COUNTER,
        CHR(MOD(ROWNUM-1,26)+65) CHARACTER
      FROM
        DUAL
      CONNECT BY
        LEVEL<=100)
    WHERE
      CHARACTER= :V1
    END OF STMT
    PARSE #3:c=0,e=128,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,tim=2874162493
    BINDS #3:
    kkscoacd
    Bind#0
      oacdty=01 mxl=32(01) mxlc=00 mal=00 scl=00 pre=00
      oacflg=03 fl2=1000000 frm=01 csi=178 siz=32 off=0
      kxsbbbfp=0f176c88  bln=32  avl=01  flg=05
      value="A"
    EXEC #3:c=0,e=498,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,tim=2874163947
    WAIT #3: nam='SQL*Net message to client' ela= 3 driver id=1413697536 #bytes=1 p3=0 obj#=10192 tim=2874164058
    FETCH #3:c=0,e=68,p=0,cr=0,cu=0,mis=0,r=1,dep=0,og=1,tim=2874164215
    WAIT #3: nam='SQL*Net message from client' ela= 299 driver id=1413697536 #bytes=1 p3=0 obj#=10192 tim=2874164657
    WAIT #3: nam='SQL*Net message to client' ela= 2 driver id=1413697536 #bytes=1 p3=0 obj#=10192 tim=2874164903
    FETCH #3:c=15625,e=359,p=0,cr=0,cu=0,mis=0,r=3,dep=0,og=1,tim=2874165155
    WAIT #3: nam='SQL*Net message from client' ela= 1162 driver id=1413697536 #bytes=1 p3=0 obj#=10192 tim=2874166774
    STAT #3 id=1 cnt=4 pid=0 pos=1 obj=0 op='VIEW  (cr=0 pr=0 pw=0 time=76 us)'
    STAT #3 id=2 cnt=100 pid=1 pos=1 obj=0 op='COUNT  (cr=0 pr=0 pw=0 time=50 us)'
    STAT #3 id=3 cnt=100 pid=2 pos=1 obj=0 op='CONNECT BY WITHOUT FILTERING (cr=0 pr=0 pw=0 time=47 us)'
    STAT #3 id=4 cnt=1 pid=3 pos=1 obj=0 op='FAST DUAL  (cr=0 pr=0 pw=0 time=4 us)'
    WAIT #0: nam='SQL*Net message to client' ela= 3 driver id=1413697536 #bytes=1 p3=0 obj#=10192 tim=2874167438
    WAIT #0: nam='SQL*Net message from client' ela= 3939 driver id=1413697536 #bytes=1 p3=0 obj#=10192 tim=2874171452
    =====================
    PARSING IN CURSOR #2 len=152 dep=0 uid=31 oct=3 lid=31 tim=2874171761 hv=2346424803 ad='a597e190'
    SELECT
    FROM
      (SELECT
        ROWNUM COUNTER,
        CHR(MOD(ROWNUM-1,26)+65) CHARACTER
      FROM
        DUAL
      CONNECT BY
        LEVEL<=100)
    WHERE
      CHARACTER= :V2
    END OF STMT
    PARSE #2:c=0,e=155,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,tim=2874171757
    BINDS #2:
    kkscoacd
    Bind#0
      oacdty=01 mxl=32(02) mxlc=01 mal=00 scl=00 pre=00
      oacflg=03 fl2=1000010 frm=02 csi=2000 siz=32 off=0
      kxsbbbfp=0f176c88  bln=32  avl=02  flg=05
      value=""
    EXEC #2:c=0,e=489,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,tim=2874173190
    WAIT #2: nam='SQL*Net message to client' ela= 3 driver id=1413697536 #bytes=1 p3=0 obj#=10192 tim=2874173300
    FETCH #2:c=0,e=68,p=0,cr=0,cu=0,mis=0,r=1,dep=0,og=1,tim=2874173453
    WAIT #2: nam='SQL*Net message from client' ela= 326 driver id=1413697536 #bytes=1 p3=0 obj#=10192 tim=2874173906
    WAIT #2: nam='SQL*Net message to client' ela= 2 driver id=1413697536 #bytes=1 p3=0 obj#=10192 tim=2874174137
    FETCH #2:c=0,e=334,p=0,cr=0,cu=0,mis=0,r=3,dep=0,og=1,tim=2874174398
    WAIT #2: nam='SQL*Net message from client' ela= 1052 driver id=1413697536 #bytes=1 p3=0 obj#=10192 tim=2874175570
    STAT #2 id=1 cnt=4 pid=0 pos=1 obj=0 op='VIEW  (cr=0 pr=0 pw=0 time=76 us)'
    STAT #2 id=2 cnt=100 pid=1 pos=1 obj=0 op='COUNT  (cr=0 pr=0 pw=0 time=46 us)'
    STAT #2 id=3 cnt=100 pid=2 pos=1 obj=0 op='CONNECT BY WITHOUT FILTERING (cr=0 pr=0 pw=0 time=43 us)'
    STAT #2 id=4 cnt=1 pid=3 pos=1 obj=0 op='FAST DUAL  (cr=0 pr=0 pw=0 time=4 us)'
    WAIT #0: nam='SQL*Net message to client' ela= 1 driver id=1413697536 #bytes=1 p3=0 obj#=10192 tim=2874176119
    WAIT #0: nam='SQL*Net message from client' ela= 998 driver id=1413697536 #bytes=1 p3=0 obj#=10192 tim=2874177197
    ...Notice that the value for the bind variable defined as VARCHAR2 printed in the trace file, while the value for the bind variable defined as NVARCHAR2 did not print in the trace file.
    If I had set the STATISTICS_LEVEL to ALL (or used a GATHER_PLAN_STATISTICS hint) I could retrieve the actual execution plan for the above SQL statements like this (if not, replace ALLSTATS LAST with TYPICAL):
    SET PAGESIZE 1000
    SET LINESIZE 160
    SELECT /*+ LEADING(S) */
      T.PLAN_TABLE_OUTPUT
    FROM
      (SELECT
        SQL_ID,
        CHILD_NUMBER
      FROM
        V$SQL
      WHERE
        SQL_TEXT LIKE '%  CHARACTER= :V_') S,
      TABLE(DBMS_XPLAN.DISPLAY_CURSOR(S.SQL_ID,S.CHILD_NUMBER,'ALLSTATS LAST +COST')) T;The output of the above looks like this:
    SQL_ID  33wwr3kqc71nc, child number 0
    SELECT   * FROM   (SELECT     ROWNUM COUNTER,     CHR(MOD(ROWNUM-1,26)+65) CHARACTER   FROM
        DUAL   CONNECT BY     LEVEL<=100) WHERE   CHARACTER= :V1
    Plan hash value: 761049541
    | Id  | Operation                      | Name | Starts | E-Rows | Cost (%CPU)| A-Rows |   A-Time   |
    |*  1 |  VIEW                          |      |      1 |      1 |     2   (0)|      4 |00:00:00.01 |
    |   2 |   COUNT                        |      |      1 |        |            |    100 |00:00:00.01 |
    |   3 |    CONNECT BY WITHOUT FILTERING|      |      1 |        |            |    100 |00:00:00.01 |
    |   4 |     FAST DUAL                  |      |      1 |      1 |     2   (0)|      1 |00:00:00.01 |
    Predicate Information (identified by operation id):
       1 - filter("CHARACTER"=:V1)
    SQL_ID  7qzd4aq5xr6g3, child number 0
    SELECT   * FROM   (SELECT     ROWNUM COUNTER,     CHR(MOD(ROWNUM-1,26)+65) CHARACTER   FROM
        DUAL   CONNECT BY     LEVEL<=100) WHERE   CHARACTER= :V2
    Plan hash value: 761049541
    | Id  | Operation                      | Name | Starts | E-Rows | Cost (%CPU)| A-Rows |   A-Time   |
    |*  1 |  VIEW                          |      |      1 |      1 |     2   (0)|      4 |00:00:00.01 |
    |   2 |   COUNT                        |      |      1 |        |            |    100 |00:00:00.01 |
    |   3 |    CONNECT BY WITHOUT FILTERING|      |      1 |        |            |    100 |00:00:00.01 |
    |   4 |     FAST DUAL                  |      |      1 |      1 |     2   (0)|      1 |00:00:00.01 |
    Predicate Information (identified by operation id):
       1 - filter(SYS_OP_C2C("CHARACTER")=:V2)Notice in the Predicate Information section of the second execution plan, a function is applied to the column - that SYS_OP_C2C function will likely prevent a normal (non-function based) index from helping to improve the execution performance.
    To answer your question, it is the client application that must correctly define the bind variable types.
    Charles Hooper
    Co-author of "Expert Oracle Practices: Oracle Database Administration from the Oak Table"
    http://hoopercharles.wordpress.com/
    IT Manager/Oracle DBA
    K&M Machine-Fabricating, Inc.

  • Interpreting Trace File.

    Hi i am using 10.2.0.4.0 version of oracle.
    I am having trace file info as below, for one of the query. So how should i interpret the trace file? What is the issue in the query, and the scope of improvement in the query? please note that , i have removed the query and its plans from the trace file, i have only posted the wait sections.
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.14       0.13          0          0          1           0
    Execute      1      6.63     162.12      33540      72921        383           0
    Fetch    17272    178.89    1933.95     274835    3147603         20      259063
    total    17274    185.66    2096.21     308375    3220524        404      259063
    Misses in library cache during parse: 1
    Optimizer mode: CHOOSE
    Parsing user id: 36 
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      control file sequential read                    4        0.00          0.00
      db file sequential read                    302812        0.62       1913.89
      latch: cache buffers chains                     3        0.04          0.04
      direct path write temp                        501        0.01          0.30
      SQL*Net message to client                   17272        0.00          0.04
      db file scattered read                        120        0.02          0.63
      direct path read temp                         608        0.14          1.71
      SQL*Net message from client                 17272       44.81      31865.74
      SQL*Net more data to client                    15        0.00          0.00
      latch: object queue header operation            1        0.00          0.00
      latch: library cache                            3        0.03          0.04
      latch: library cache pin                        1        0.00          0.00
      latch: cache buffer handles                     1        0.00          0.00
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.14       0.13          0          0          1           0
    Execute      1      6.63     162.12      33540      72921        383           0
    Fetch    17272    178.89    1933.95     274835    3147603         20      259063
    total    17274    185.66    2096.21     308375    3220524        404      259063
    Misses in library cache during parse: 1
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                   17275        0.00          0.04
      SQL*Net message from client                 17274       75.57      31941.39
      SQL*Net more data from client                   2        0.00          0.01
      db file sequential read                    302812        0.62       1913.89
      control file sequential read                    4        0.00          0.00
      latch: cache buffers chains                     3        0.04          0.04
      direct path write temp                        501        0.01          0.30
      db file scattered read                        120        0.02          0.63
      direct path read temp                         608        0.14          1.71
      SQL*Net more data to client                    15        0.00          0.00
      latch: object queue header operation            1        0.00          0.00
      latch: library cache                            3        0.03          0.04
      latch: library cache pin                        1        0.00          0.00
      latch: cache buffer handles                     1        0.00          0.00
    OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse       11      0.02       0.01          0          0          0           0
    Execute    348      0.20       0.17          0          0          1           0
    Fetch      367      0.06       0.37         59       1187          0        3806
    total      726      0.28       0.56         59       1187          1        3806
    Misses in library cache during parse: 11
    Misses in library cache during execute: 10
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      db file sequential read                        59        0.01          0.32
        1  user  SQL statements in session.
      348  internal SQL statements in session.
      349  SQL statements in session.
    ********************************************************************************

    below is the estimate and actual results.
    | Id  | Operation                              | Name                        | Starts | E-Rows | A-Rows |   A-Time   | Buffers | Reads  | Writes |  OMem |  1Mem | Us
    ed-Mem | Used-Tmp|
    |*  1 |  COUNT STOPKEY                         |                             |  13475 |        |  13475 |00:01:32.33 |     134K|  11357 |      0 |       |       |
        |         |
    |   2 |   NESTED LOOPS                         |                             |  13475 |      2 |  13475 |00:01:31.66 |     134K|  11357 |      0 |       |       |
        |         |
    |   3 |    NESTED LOOPS                        |                             |  13475 |      1 |  13475 |00:01:29.22 |   94325 |  11357 |      0 |       |       |
        |         |
    |*  4 |     INDEX RANGE SCAN                   |                |  13475 |      1 |  13475 |00:00:26.63 |   40425 |   4014 |      0 |       |       |
        |         |
    |   5 |     TABLE ACCESS BY INDEX ROWID        | |  13475 |      1 |  13475 |00:01:02.46 |   53900 |   7343 |      0 |       |       |
        |         |
    |*  6 |      INDEX RANGE SCAN                  ||  13475 |      1 |  13475 |00:00:16.80 |   40425 |   2056 |      0 |       |       |
        |         |
    |*  7 |    TABLE ACCESS FULL                   | |  13475 |      2 |  13475 |00:00:02.26 |   40425 |      0 |      0 |       |       |
        |         |
    |   8 |  TABLE ACCESS BY INDEX ROWID           ||  94399 |      1 |  94399 |00:06:17.09 |     389K|  32207 |      0 |       |       |
        |         |
    |*  9 |   INDEX UNIQUE SCAN                    | |  94399 |      1 |  94399 |00:02:59.79 |     294K|  15488 |      0 |       |       |
        |         |
    |  10 |  TEMP TABLE TRANSFORMATION             |                             |      1 |        |    170K|00:35:11.08 |    1575K|    195K|   6158 |       |       |
        |         |
    |  11 |   LOAD AS SELECT                       |                             |      1 |        |      1 |00:04:49.06 |   53704 |  28653 |    264 |   525K|   525K|  5
    25K (0)|              |
    |  12 |    PARTITION RANGE ALL                 |                             |      1 |  55430 |  16097 |00:06:26.06 |   53433 |  28651 |      0 |       |       |
        |         |
    |  13 |     PARTITION HASH ALL                 |                             |     54 |  55430 |  16097 |00:09:20.69 |   53433 |  28651 |      0 |       |       |
        |         |
    |* 14 |      TABLE ACCESS BY LOCAL INDEX ROWID | INV                         |    432 |  55430 |  16097 |00:06:11.42 |   53433 |  28651 |      0 |       |       |
        |         |
    |* 15 |       INDEX SKIP SCAN                  | |    432 |    125K|  16097 |00:00:39.90 |    4642 |   4508 |      0 |       |       |
        |         |
    |  16 |   TABLE ACCESS BY INDEX ROWID          | |      1 |      2 |    170K|00:30:21.66 |    1522K|    166K|   5894 |       |       |
        |         |
    |  17 |    NESTED LOOPS                        |                             |      1 |     97 |    276K|34:55:49.92 |    1470K|    150K|   5894 |       |       |
        |         |
    |  18 |     NESTED LOOPS                       |                             |      1 |     55 |    105K|00:22:14.57 |    1128K|    134K|   5894 |       |       |
        |         |
    |  19 |      NESTED LOOPS OUTER                |                             |      1 |     52 |    105K|00:16:32.91 |     694K|    105K|   5894 |       |       |
        |         |
    |* 20 |       HASH JOIN                        |                             |      1 |     52 |    105K|00:16:19.68 |     402K|    102K|   5894 |  9641K|  2205K| 16
    27K (1)|        10240 |
    |  21 |        VIEW                            |                             |      1 |  65234 |    105K|00:16:16.46 |     402K|    101K|   4655 |       |       |
        |         |
    |  22 |         SORT UNIQUE                    |                             |      1 |  65234 |    105K|00:16:16.46 |     402K|    101K|   4655 |  8724K|  1161K| 61
    8K (48)|         9216 |
    |  23 |          UNION-ALL                     |                             |      1 |        |    105K|00:14:59.93 |     402K|  97342 |    252 |       |       |
        |         |
    |  24 |           NESTED LOOPS OUTER           |                             |      1 |  19975 |    105K|00:14:10.24 |     395K|  94655 |      0 |       |       |
        |         |
    |  25 |            NESTED LOOPS                |                             |      1 |  19975 |    105K|00:13:58.47 |     140K|  93616 |      0 |       |       |
        |         |
    |  26 |             VIEW                       |                             |      1 |  55430 |  16097 |00:00:00.43 |     270 |    531 |      0 |       |       |
        |         |
    |  27 |              TABLE ACCESS FULL         | |      1 |  55430 |  16097 |00:00:00.19 |     270 |    531 |      0 |       |       |
        |         |
    |* 28 |             TABLE ACCESS BY INDEX ROWID| |  16097 |      1 |    105K|00:13:59.70 |     140K|  93085 |      0 |       |       |
        |         |
    |* 29 |              INDEX RANGE SCAN          |     |  16097 |     10 |    145K|00:00:40.42 |   32685 |   8237 |      0 |       |       |
        |         |
    |  30 |            TABLE ACCESS BY INDEX ROWID | |    105K|      1 |  84716 |00:00:16.78 |     254K|   1039 |      0 |       |       |
        |         |
    |* 31 |             INDEX UNIQUE SCAN          | |    105K|      1 |  84716 |00:00:13.05 |     169K|    982 |      0 |       |       |
        |         |
    |  32 |           NESTED LOOPS                 |                             |      1 |  45259 |      0 |00:00:17.19 |    7336 |   2687 |    252 |       |       |
        |         |
    |* 33 |            HASH JOIN RIGHT OUTER       |                             |      1 |  45259 |      0 |00:00:17.19 |    7336 |   2687 |    252 |   884K|   884K|  3
    09K (0)|              |
    |  34 |             TABLE ACCESS FULL          | |      1 |   1673 |   1677 |00:00:00.01 |      24 |      8 |      0 |       |       |
        |         |
    |* 35 |             HASH JOIN                  |                             |      1 |  45259 |      0 |00:00:17.13 |    7310 |   2678 |    252 |  3318K|  1235K|  4
    47K (1)|         2048 |
    |* 36 |              TABLE ACCESS FULL         | |      1 |  45259 |  49043 |00:00:07.41 |    7043 |   2170 |      0 |       |       |
        |         |
    |  37 |              VIEW                      |                             |      1 |  55430 |  16097 |00:00:00.14 |     267 |    256 |      0 |       |       |
        |         |
    |  38 |               TABLE ACCESS FULL        ||      1 |  55430 |  16097 |00:00:00.12 |     267 |    256 |      0 |       |       |
        |         |
    |  39 |            TABLE ACCESS BY INDEX ROWID | |      0 |      1 |      0 |00:00:00.01 |       0 |      0 |      0 |       |       |
        |         |
    |* 40 |             INDEX UNIQUE SCAN          | |      0 |      1 |      0 |00:00:00.01 |       0 |      0 |      0 |       |       |
        |         |
    |  41 |        VIEW                            |                             |      1 |  55430 |  16097 |00:00:00.02 |     267 |      0 |      0 |       |       |
        |         |
    |  42 |         TABLE ACCESS FULL              | |      1 |  55430 |  16097 |00:00:00.01 |     267 |      0 |      0 |       |       |
        |         |
    |  43 |       TABLE ACCESS BY INDEX ROWID      | |    105K|      1 |  93385 |00:00:24.90 |     291K|   2104 |      0 |       |       |
        |         |
    |* 44 |        INDEX UNIQUE SCAN               | |    105K|      1 |  93385 |00:00:16.45 |     196K|   1405 |      0 |       |       |
        |         |
    |  45 |      TABLE ACCESS BY INDEX ROWID       | |    105K|      1 |    105K|00:05:49.82 |     434K|  29495 |      0 |       |       |
        |         |
    |* 46 |       INDEX UNIQUE SCAN                ||    105K|      1 |    105K|00:02:54.37 |     328K|  14644 |      0 |       |       |
        |         |
    |* 47 |     INDEX RANGE SCAN                   | |    105K|      2 |    170K|00:03:01.14 |     342K|  15690 |      0 |       |       |
        |         |
    Predicate Information (identified by operation id):
       1 - filter(1>=ROWNUM)
       4 - access("XS"."SITEPK"=:B1)
       6 - access("XS"."VENDORPK"="XB"."VENDORPK")
       7 - filter(("XB"."BUYERCOMPANYPK"="CC"."PARENTCOMPANYPK" OR "XB"."BUYERCOMPANYPK"="CC"."CHILDCOMPANYPK"))
       9 - access("INVOICEPK"=:B1 AND "LINENUM"=:B2)
      14 - filter(("IH"."INVOICEORIGIN"='APP' AND "IH"."PO_PK" IS NULL AND "IH"."ISPOSTED"='Y'))
      15 - access("IH"."PAYPK"=3914297352 AND "IH"."POSTDATE">=1338508800000 AND "IH"."POSTDATE"<1341014400000)
           filter(("IH"."POSTDATE">=1338508800000 AND "IH"."PAYPK"=3914297352 AND "IH"."POSTDATE"<1341014400000))
      20 - access("NEWVIEW"."PRIMARYKEY"="TAB"."INVOICEPK")
      28 - filter(TO_NUMBER("RAT"."AUDITTYPE")<2)
      29 - access("INNERTAB1"."INVOICEPK"="RAT"."INVOICEPK")
           filter("RAT"."INVOICEPK" IS NOT NULL)
      31 - access("RAT"."USERPK"="UR"."USERPK")
      33 - access("RA"."QUEUEPK"="Q"."QUEUEPK")
      35 - access("INNERTAB2"."INVOICEPK"="RA"."INVOICEPK")
      36 - filter(("RA"."INVOICEPK" IS NOT NULL AND "RA"."RECEIVERPK" IS NOT NULL))
      40 - access("RA"."RECEIVERPK"="UR"."USERPK")
      44 - access("TAB"."ENTEREDBY"="UR"."USERPK")
      46 - access("TAB"."INVOICEPK"="ISUM"."INVOICEPK")
      47 - access("IDD"."INVOICEPK"="TAB"."INVOICEPK")
    87 rows selected.
    Elapsed: 00:00:04.10
    SQL>Edited by: 930254 on Aug 7, 2012 9:33 AM

  • Numerous trace files are generating every minute causing space issue

    Hi All,
    numerous trace files are generating every minute <SID>_<PID>_APPSPERF01.trc  format.
    entry in trace file will be like..
    EXEC #10:c=0,e=0,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,plh=1734896627,tim=1339571764486430
    WAIT #10: nam='SQL*Net message to client' ela= 6 driver id=1952673792 #bytes=1 p3=0 obj#=34562 tim=1339571764491273
    FETCH #10:c=0,e=0,p=0,cr=2,cu=0,mis=0,r=1,dep=0,og=1,plh=1734896627,tim=1339571764486430
    WAIT #10: nam='SQL*Net message from client' ela= 277 driver id=1952673792 #bytes=1 p3=0 obj#=34562 tim=1339571764491806
    EXEC #11:c=0,e=0,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,plh=2638510909,tim=1339571764486430
    FETCH #11:c=0,e=0,p=0,cr=9,cu=0,mis=0,r=0,dep=0,og=1,plh=2638510909,tim=1339571764486430
    WAIT #11: nam='SQL*Net message to client' ela= 6 driver id=1952673792 #bytes=1 p3=0 obj#=34562 tim=1339571764493265
    *** 2012-06-13 03:16:14.496
    WAIT #11: nam='SQL*Net message from client' ela= 10003326 driver id=1952673792 #bytes=1 p3=0 obj#=34562 tim=1339571774496705
    BINDS #10:
    Bind#0
    oacdty=01 mxl=32(21) mxlc=00 mal=00 scl=00 pre=00
    oacflg=00 fl2=1000001 frm=01 csi=871 siz=2064 off=0
    kxsbbbfp=2b8ec799df38 bln=32 avl=03 flg=05
    value="535"
    Bind#1
    oacdty=01 mxl=32(21) mxlc=00 mal=00 scl=00 pre=00
    oacflg=00 fl2=1000001 frm=01 csi=871 siz=0 off=32
    kxsbbbfp=2b8ec799df58 bln=32 avl=04 flg=01
    value="1003"
    SQL> show parameter trace
    NAME TYPE VALUE
    tracefiles_public boolean TRUE
    log_archive_trace integer 0
    sec_protocol_error_trace_action string TRACE
    sql_trace boolean FALSE
    trace_enabled boolean TRUE
    tracefile_identifier string
    Profile options like "FND:Debug Log Enabled" and "Utilities:SQL Trace" are set to No
    Can some one help me to stop these trace generation.
    is there any way to find the cause for these trace?
    Thanks in adv...

    Hi;
    Please check who enable trace. Please see:
    How to audit users who enabled traces?
    check concurrent programs first
    *from the screen
    *F11, then select the trace, then Ctrl+F11
    Concurrent > program > define
    open the form, press F11 (query mode), select the trace, then (ctrl + f11) this should return all concurrent programs which have trace enabled
    Regard
    Helios

  • Trace file generation using oradebug

    DB version : 10.2.0.4.0
    OS : Solaris 5.10
    I am trying to trace a session started by a Java application.
    So, i've logged in as SYS. Got pid, spid from v$process. Then started the debug
    SYS@MN_PROD>oradebug setospid 2523
    SYS@MN_PROD>oradebug event 10046 trace name context forever, level 32and closed it using
    oradebug event 10046 trace name context offWhen i type
    ORADEBUG TRACEFILE_NAMEIt shows a filename in bdump directory. But i can't find this file in bdump or udump.
    Is there any init.ora setting i need to do to get this file generated?

    Decimal Binary Description
    1       0001   Emit statistics for parse, execute, fetch, commit, and rollback database calls (standard sql_trace)
    2       0010   Unknown
    4       0100   Emit values for SQL bind variables (also called “placeholders”)
    8       1000   Emit statistics for Oracle kernel internal function calls (also called “wait events”) listed in v$event_name
    These levels can be combined as if by a bitwise or function to produce combinations of data in an Oracle trace file.
    A value of 15 is just a combination of all 4 preceeding values

  • About Trace file

    Hi
    Can I create a trace file as my desire name in Udump folder? Because there are so many trc files in my udump folder. If I soft by date also, i can't recognize my trace file which is recently created.
    Please advise...!!
    Regards
    Arpitha

    Hi
    How to see the following output of TKPROF for a query? and also how to see the Wait events info? Please help me?
    My query
    SELECT * FROM emp, dept
    WHERE emp.deptno = dept.deptno;I would like to see the trace file output like this...
    call   count      cpu    elapsed     disk    query current    rows
    Parse     11     0.08      0.18        0       0       0         0
    Execute   11     0.23      0.66        0       3       6         0
    Fetch     35     6.70      6.83      100   12326       2       824
    total     57     7.01      7.67      100   12329       8       826
    Misses in library cache during parse: 0 Wait events info.
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      db file sequential read                      8084        0.12          5.34
      direct path write                             834        0.00          0.00
      direct path write temp                        834        0.00          0.05
      db file parallel read                           8        1.53          5.51
      db file scattered read                       4180        0.07          1.45
      direct path read                             7082        0.00          0.05
      direct path read temp                        7082        0.00          0.44
      rdbms ipc reply                                20        0.00          0.01
      SQL*Net message to client                       1        0.00          0.00
      SQL*Net message from client                     1        0.00          0.00please help me in this regard..!!

  • How to find db file scatered read in trace file?

    Hi All,
    Was just going through basic concepts...
    1. Created table T1with 1000 rows in LMT of 8k block size.
    2. enabled tracing - alter session set events '10046 trace name context forever, level 12';
    3. performed - select * from T1;
    4. ALTER SYSTEM SET EVENTS '10046 trace name context off';
    Now i didnt found any db file scatered read in trace, as select is opting for full table scan...whats the problem here?
    I found only sql* net messages in trace file.
    -Yasser

    No luck..
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE    10.2.0.4.0      Production
    TNS for Solaris: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    SQL> create table tt1 as select * from dba_objects;
    Table created.
    SQL> alter system flush buffer_cache;
    System altered.
    SQL> ALTER SYSTEM SET EVENTS '10046 trace name context forever, level 12';
    System altered.
    SQL> select * from tt1;
    ------Excluded unwanted output---
    SQL> ALTER SYSTEM SET EVENTS '10046 trace name context off';
    System altered.
    Now content in trace file-
    /usr/local/opt/oracle/admin/mytest/udump/mytest1_ora_7053.trc
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, Real Application Clusters, OLAP, Data Mining
    and Real Application Testing options
    ORACLE_HOME = /usr/local/opt/oracle/product/10.2.0
    System name:    SunOS
    Node name:      xxxxxxx
    Release:        5.10
    Version:        Generic_125100-06
    Machine:        sun4us
    Instance name: mytest1
    Redo thread mounted by this instance: 1
    Oracle process number: 24
    Unix process pid: 7053, image: oracle@xxxxxx (TNS V1-V3)
    *** 2009-10-14 03:39:06.573
    *** ACTION NAME:() 2009-10-14 03:39:06.572
    *** MODULE NAME:(sqlplus@xxxxxx (TNS V1-V3)) 2009-10-14 03:39:06.572
    *** SERVICE NAME:(SYS$USERS) 2009-10-14 03:39:06.572
    *** SESSION ID:(148.71) 2009-10-14 03:39:06.572
    WAIT #1: nam='SQL*Net message to client' ela= 2 driver id=1650815232 #bytes=1 p3=0 obj#=-1 tim=13972153430324
    WAIT #1: nam='SQL*Net message from client' ela= 6241448 driver id=1650815232 #bytes=1 p3=0 obj#=-1 tim=13972159672267
    =====================
    PARSING IN CURSOR #1 len=16 dep=0 uid=0 oct=3 lid=0 tim=13972159673957 hv=2245880055 ad='c952ec28'
    select * from t1
    END OF STMT
    PARSE #1:c=0,e=1550,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=1,tim=13972159673952
    BINDS #1:
    EXEC #1:c=0,e=59,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,tim=13972159674104
    WAIT #1: nam='SQL*Net message to client' ela= 3 driver id=1650815232 #bytes=1 p3=0 obj#=-1 tim=13972159674145
    FETCH #1:c=0,e=84,p=0,cr=4,cu=0,mis=0,r=1,dep=0,og=1,tim=13972159674266
    WAIT #1: nam='SQL*Net message from client' ela= 224 driver id=1650815232 #bytes=1 p3=0 obj#=-1 tim=13972159674531
    WAIT #1: nam='SQL*Net message to client' ela= 0 driver id=1650815232 #bytes=1 p3=0 obj#=-1 tim=13972159674557
    FETCH #1:c=0,e=29,p=0,cr=1,cu=0,mis=0,r=15,dep=0,og=1,tim=13972159674580
    WAIT #1: nam='SQL*Net message from client' ela= 408 driver id=1650815232 #bytes=1 p3=0 obj#=-1 tim=13972159675013
    WAIT #1: nam='SQL*Net message to client' ela= 3 driver id=1650815232 #bytes=1 p3=0 obj#=-1 tim=13972159675167
    FETCH #1:c=0,e=86,p=0,cr=1,cu=0,mis=0,r=15,dep=0,og=1,tim=13972159675198
    WAIT #1: nam='SQL*Net message from client' ela= 427 driver id=1650815232 #bytes=1 p3=0 obj#=-1 tim=13972159675706
    WAIT #1: nam='SQL*Net message to client' ela= 0 driver id=1650815232 #bytes=1 p3=0 obj#=-1 tim=13972159675732
    FETCH #1:c=0,e=28,p=0,cr=1,cu=0,mis=0,r=15,dep=0,og=1,tim=13972159675754
    WAIT #1: nam='SQL*Net message from client' ela= 280 driver id=1650815232 #bytes=1 p3=0 obj#=-1 tim=13972159676056
    WAIT #1: nam='SQL*Net message to client' ela= 1 driver id=1650815232 #bytes=1 p3=0 obj#=-1 tim=13972159676117
    FETCH #1:c=0,e=44,p=0,cr=1,cu=0,mis=0,r=15,dep=0,og=1,tim=13972159676144
    .................SAME MESSAGES.....................But i did not find any scattered read event.
    Seems like i am missing some thing.
    -Yasser
    Edited by: YasserRACDBA on Oct 15, 2009 12:00 PM
    Edited Node name

  • No wait events info in trace file?

    A very good day to all experts,
    I am tracing a session using the below procedure.
    dbms_system.set_ev(12,13,EV=>10046,LE=>12,NM=>'');
    I am just displaying the following information in trace file.Trace file is not displaying any wait events even when i am doing level 12 tracing.How i can see the wait event information in trace files?
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 0.01 0.01 0 0 0 0
    Fetch 2 0.00 0.05 2 2 0 1
    total 4 0.01 0.07 2 2 0 1
    Misses in library cache during parse: 1
    Optimizer mode: CHOOSE
    Parsing user id: 55
    Rows Row Source Operation
    1 TABLE ACCESS BY INDEX ROWID aaa_USERS (cr=2 pr=2 pw=0 time=58806 us)
    1 INDEX UNIQUE SCAN SYS_C004271 (cr=1 pr=1 pw=0 time=42773 us)(object id 47506)
    Thank you....

    Your post is without version information up to 4 digits.
    You post tkprof output.
    Not all version of Oracle have tkprof post wait event info.
    IIRC. this started in Oracle 9iR2.
    You would need to look in the raw trace file to find out whether this information is actually available. You will find it is.
    This could likely being caused by using 8i, which doesn't have this facility.
    But as you don't post a version, your question can not be answered.
    Sybrand Bakker
    Senior Oracle DBA

Maybe you are looking for

  • Install HRCS 9.0 R5 with Linux Issue: upgrade Database HRCS 9.0 from PT8.52 to PT8.53

    Folks, Hello. I have been installing HCM and Campus Solution 9.0 with PeopleTools8.53. Server machine is Oracle Linux 5.10 and client machine is Windows XP.  My internet architecture is WebLogic11g/Tuxedo11g/OracleDatabase 11gR1. Peopletools 8.53 run

  • To write data as an IDOC for EDI 858 (bill of lading) through reports.

    Hey everybody, I need serious help about this. I am back to my question that I asked before. I don't understand still how to write out the data as an IDOC when we are not doing EDI through a VAN but dumping the file onto both application and presenta

  • Dual layer burns failing

    Hi all. I am at a loss regarding burning dual layer DVD+R discs. I posted a previous thread with Toast in the title but the problem has turned out much more broader than that. After half a dozen successful DVD+R DL burns, some to the full capacity of

  • Sync help please please please

    Hi i have bought an classic 80gb 2 weeks ago transferred 1/3 0f my songs from my creative onto the hard drive as it wouldnt let me do all at once but when i try to transfer any more music all i get is erase and sync hence losing any transfer already

  • SAP ECC 6.0 delivered Roles - SOD compliant?

    Are SAP ECC 6.0 delivered roles SOD compliant as per the GRC ruleset?