Statistics 'Lines' of STAT in the trace event 10046, Oracle 11 g.

Hi all!

Why the statistical "Rows" in STAT are different for 10g and 11g?

I have two database with version 10g and 11g, with the same data.
I executed pl/sql code with 10046 trace level 8.
And I get different results when get a raw trace.
In 10g I get statistical lines for all executions - lines = 7.
11 g I get statistics lines first executions - lines = 1. Why?


See my example:
declare
     type t_name_tbl is table of varchar2(30) index by binary_integer;
     v_name_tbl t_name_tbl;
     v_len      number := 10;
begin
     execute immediate 'alter session set timed_statistics = true ';
     execute immediate 'alter session set statistics_level=all ';
     execute immediate 'alter session set max_dump_file_size = unlimited ';
     execute immediate 'alter session set events ''10046 trace name context forever,level 8'' ';

     loop
       select cour_name bulk collect
            into v_name_tbl
           from country t
          where length(t.cour_name) = v_len;
     
       exit when v_len = 0;
       v_len := v_len - 1;
       for i in 1 .. v_name_tbl.count loop
         dbms_output.put_line(v_name_tbl(i));
       end loop;
     end loop;

end;
Result Tkprof to Oracle 10g:
SELECT COUR_NAME 
FROM
 COUNTRY T WHERE LENGTH(T.COUR_NAME) = :B1 


call     count       cpu    elapsed       disk      query    current        rows
------- ------  -------- ---------- ---------- ---------- ----------  ----------
Parse        1      0.00       0.00          0          0          0           0
Execute     11      0.00       0.00          0          0          0           0
Fetch       11      0.01       0.00          0         44          0           7
------- ------  -------- ---------- ---------- ---------- ----------  ----------
total       23      0.01       0.00          0         44          0           7

Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 649     (recursive depth: 1)

Rows     Row Source Operation
-------  ---------------------------------------------------
      7  TABLE ACCESS FULL COUNTRY (cr=44 pr=0 pw=0 time=1576 us)
Tkprof to Oracle 11g result:
SQL ID: 3kqmkg8jp5nwk
Plan Hash: 1371235632
SELECT COUR_NAME 
FROM
 COUNTRY T WHERE LENGTH(T.COUR_NAME) = :B1 


call     count       cpu    elapsed       disk      query    current        rows
------- ------  -------- ---------- ---------- ---------- ----------  ----------
Parse        1      0.01       0.00          0          0          0           0
Execute     11      0.02       0.01          0          0          0           0
Fetch       11      0.00       0.01          3         44          0           7
------- ------  -------- ---------- ---------- ---------- ----------  ----------
total       23      0.03       0.02          3         44          0           7

Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 82     (recursive depth: 1)

Rows     Row Source Operation
-------  ---------------------------------------------------
      1  TABLE ACCESS FULL COUNTRY (cr=4 pr=3 pw=0 time=0 us cost=2 size=44 card=2)
Can I read about it?

Oracle 11g default written execution plan (lines in the raw trace STAT file) after the first execution of the SQL statement, while before 11 g, the execution plan is written when the slider is closed.

The behavior in 11g can be controlled by changing the parameter PLAN_STAT of the call that allows the monitoring of the default value of FIRST_EXECUTION to ALL_EXECUTIONS:
http://download.Oracle.com/docs/CD/B28359_01/AppDev.111/b28419/d_sessio.htm#i1010518

Charles Hooper
Co-author of "Expert Oracle practices: Oracle Database Administration of the Oak Table.
http://hoopercharles.WordPress.com/
IT Manager/Oracle DBA
K & M-making Machine, Inc.

Published by: Charles Hooper on August 9, 2010 15:33
The default value on 11g is FIRST_EXECUTION, while the behavior before 11 g is ALL_EXECUTIONS - fixed the incomplete sentence.

Tags: Database

Similar Questions

  • trace event 10046 - missing privileges

    Hello

    Version 11201
    Please notice what privileges are missing:

    SQL > ALTER SESSION SET events 10046 trace name forever, context level 12';
    ERROR:
    ORA-01031: insufficient privileges

    Thank you

    AllYourDataBase wrote:
    I guess that the privilege of the "alter session".

    I would also say that, but I have the documentation to prove also good :)

    http://download.Oracle.com/docs/CD/B19306_01/network.102/b14266/AppendixA.htm#CHDIBAJE

    "
    Note that the ALTER SESSION privilege is required to set events. Very few users of database should require the alter session privilege.

    SQL > ALTER SESSION SET EVENTS...

    The alter session privilege is not required for other orders of alter session.

    SQL > ALTER SESSION SET NLS_TERRITORY = FRANCE;
    "

  • The application has failed to start because its side-by-side configuration is incorrect. See the application event log or use the command-line sxstrace.exe for more details

    Hello

    I can t open Google Earth or Microsoft Office programs because I get this message - the application could not start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe for more details.

    A few days ago I could open all what programs. I put t know what is the problem.

    I did sxstrace and that's what I have-

    =================
    Launch the activation context generation.
    Input parameter:
    Flags = 0
    ProcessorArchitecture = Wow32
    CultureFallBacks = en-US; en
    ManifestPath = C:\Program Files (x 86) \Google\Google Earth\client\googleearth.exe
    AssemblyDirectory = C:\Program Files (x 86) \Google\Google Earth\client\
    Application configuration file =
    -----------------
    INFO: File analysis shows C:\Program Files (x 86) \Google\Google Earth\client\googleearth.exe.
    INFO: Manifest definition identity is (null).
    INFO: Reference: Microsoft.VC80.CRT, processorArchitecture = "x 86" publicKeyToken = "1fc8b3b9a1e18e3b", type = "win32", version = "8.0.50727.4053"
    INFO: Resolving reference Microsoft.VC80.CRT, processorArchitecture = "x 86" publicKeyToken = "1fc8b3b9a1e18e3b", type = "win32", version = "8.0.50727.4053".
    INFO: Resolving reference for ProcessorArchitecture WOW64.
    INFO: Resolving reference for the neutral culture.
    INFO: Application binding policy.
    INFO: No found publisher policy.
    INFO: No redirect political connection is found.
    INFO: Start the detection of assembly.
    INFO: Can't find the assembly in WinSxS.
    NEWS: Try to detect manifest to C:\Windows\assembly\GAC_32\Microsoft.VC80.CRT\8.0.50727.4053__1fc8b3b9a1e18e3b\Microsoft.VC80.CRT.DLL.
    INFO: Found no manifesto for the neutral culture.
    INFO: End detection of assembly.
    INFO: Resolving reference for ProcessorArchitecture x 86.
    INFO: Resolving reference for the neutral culture.
    INFO: Application binding policy.
    NEWS: Control strategy of the Publisher C:\Windows\WinSxS\manifests\x86_policy.8.0.microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.5592_none_517247830f45081d.manifest
    INFO: Start the detection of assembly.
    INFO: End detection of assembly.
    ERROR: Activation context generation failed.
    End activation context generation.

    Help, please!

    This type of error can be caused if the Visual C++ library runtime components are missing or because of a third-party software.

    Follow the steps below:
     
    Method 1:
    If the problem is caused by the lack of Visual C++ libraries, you can download and install the Runtime components of Visual C++ libraries from the link below:
     
    This error can occur when the Microsoft .NET Framework installation on the computer is damaged or is missing.

    Try it out below step to reinstall and repair installation of Microsoft .NET Framework on the computer, then check if you can install the software.

    (a) click the Start button, select Control Panel, click programs and then click on 'Turn Windows has or not.' If you are prompted for an administrator password or a confirmation, type the password or provide confirmation.

    (b) search for Microsoft .NET framework 3.5.1 uncheck, click OK and restart the computer.

    (c) after the reboot, open again "Turn Windows features on or off" and place a check next to Microsoft .NET framework 3.5.1 and restart the computer.

    Step 2

    If the previous step fails, then I suggest that you manually download and install Microsoft Visual C++ 2005 and 2008 Redistributable Package and check to see if you can install the software.

    In programs and features, you do not show that you have installed Microsoft Visual C++ 2005 Redistributable and Microsoft Visual C++ 2008 Redistributable? If this is not the case, download the links here.
     
    Package redistributable Visual C++ 2005 (X 86)
     http://www.Microsoft.com/downloads/en/details.aspx?FamilyId=32BC1BEE-A3F9-4C13-9C99-220B62A191EE&displaylang=en
     
    Visual C++ 2005 (x 64) redistributable package manager
     http://www.Microsoft.com/downloads/en/details.aspx?FamilyId=eb4ebe2d-33c0-4A47-9dd4-b9a6d7bd44da&displaylang=en

    Package redistributable Microsoft Visual C++ 2008 (x 86)

    http://www.Microsoft.com/downloads/en/details.aspx?FamilyId=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&displaylang=en

    Package redistributable Visual C++ 2008 SP1 (x 64)
     http://www.Microsoft.com/downloads/en/details.aspx?FamilyId=BA9257CA-337F-4B40-8C14-157CFDFFEE4E&displaylang=en

    I hope this helps.

  • "Error: the application failed to start because the side by side configuration is incorrect, please see the application event log or use the command-line sxstrace.exe for more details.

    I have QQ (an international chat program) installed on the laptop. Then my hard drive crashed. Now when I try to reinstall it on my new hard drive I get the following message:

    "Error: the application failed to start because the side by side configuration is incorrect, please see the application event log or use the command-line sxstrace.exe for details" -how can I solve this problem? I have Windows 7.

    Hello

    Thanks for choosing Microsoft Community to post your question.

    It seems that you can not install application QQ, you get an error: "the application could not start because the side by side configuration is incorrect, please see the application event log or use the command-line sxstrace.exe for more details.

    We're here to help and guide you in the right direction. This problem could be caused when the computer is missing the correct C++ run time for your type of system components. (x 86 or x 64).

    Here are a few troubleshooting steps that you can try to solve this problem.

    Method 1: we will install Microsoft Visual C++ for your computer package.

    Note: If you use the 32-bit operating system, download and install 32-bit edition(X86).

    If you use the 64-bit operating system, download and install edition(X64) 64-bit.

    Microsoft Visual C++ 2008 SP1 Redistributable Package (x 86)
    http://www.Microsoft.com/downloads/en/details.aspx?FamilyId=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2&displaylang=en

    Microsoft Visual C++ 2008 SP1 Redistributable Package (x 64)
     http://www.Microsoft.com/downloads/en/details.aspx?FamilyId=BA9257CA-337F-4B40-8C14-157CFDFFEE4E&displaylang=en

    Package redistributable Microsoft Visual C++ 2010 (x 86)

    http://www.Microsoft.com/downloads/en/details.aspx?FamilyId=a7b7a05e-6de6-4D3A-A423-37bf0912db84

    Package redistributable Microsoft Visual C++ 2010 (x 64)

    http://www.Microsoft.com/downloads/en/details.aspx?FamilyId=bd512d9e-43c8-4655-81bf-9350143d5867

    Method 2: Run the fixit available at the following link.

    Solve problems with programs that cannot be installed or uninstalled

    http://support.Microsoft.com/mats/Program_Install_and_Uninstall

    Also, check the event log using Event Viewer.

    Please see the link below for more information on how to use Event Viewer to check the error message or information,

    http://Windows.Microsoft.com/en-us/Windows7/what-information-appears-in-event-logs-Event-Viewer

    If you have additional problems, please reply to this post and we will be happy to help you further.

  • WINDOWS 7 error the application failed to start because the side by side configuration is incorrect, please see the application event log or use the command-line sxstrace.exe for more details.

    «WINDOWS 7 error the application failed to start because the side by side configuration is incorrect, please see the application event log or use the command-line sxstrace.exe for more details.»

    This cams almost for all the applications that I try to open. I read all kinds of things to solve problems, but I can't install anything because it is constantly on the screen.

    I think it's like that because my computer shuts off when I was doing the system restore, because he has not started.

    I don't know what to do.

    Hello

     
    You can view the event log by using Event Viewer. See the link below for more information about how to use Event Viewer to check the error message or information,
     
    Please check the information in Event Viewer and let us know the problem more briefly for a better solution.
     

    Method 1:
    However, try the SFC (System File Checker) scan on the computer. Check out the following link to do the same thing:
    How to use the System File Checker tool to fix the system files missing or corrupted on Windows Vista or Windows 7
    http://support.Microsoft.com/kb/929833
     
    Method 2:
    You try to run the fixit given in the following link and check if it works:
  • Confusion in the order of line and statement-level trigger

    Hi can anyone tell me, if I create a trigger on the emp table as in order...

    BEFORE INSERTING... LINE LEVEL
    BEFORE INSERTING... LEVEL STMNT
    AFTER INSERTING... LINE LEVEL
    AFTER INSERTING... LEVEL STMNT


    that will be the order of execution of the trigers?
    How oracle will decide order?

    Please give me some documents related to the order of execution of triggers... thnx in advance... !

    PC says:
    Hello.. Obtained response on the order of... but 1 weird point I m feeling that

    in the case of, before insertion... stmnt fire triger level 1 then insert before... line.

    but in the case of after insert... fireing level trigger line then 1 after insertion... stmnt level...

    can you explain this also...

    Why is it so strange.

    You have a statement that you are running.

    The first possible thing is that you are 'before' the statement.

    The next thing that is possible is that the statement is executed for each line.

    So for each line, there is a 'before' to each line and a point "after" each line.

    Once the statement is executed, you are 'after' the statement.

    Thus, it makes sense the statement triggers surrounds education and line triggers are education, and of course 'before' comes before 'after '.

  • If they then click on the same line, even once, the change event does

    I have an advanced datagrid where I listen for change events when they click on a line

    < mx:change >
    <! [CDATA]
    showMonthDataPopup (event.rowIndex);
    []] >
    < / mx:change >

    If they then click on the same line again the event doesn't fire, but if you click on another line, how can I fix.

    Not sure, but look if ADG has an itemClick event.
    Tracy

  • Single line ink = unique uniform drawn line in the trace function? Nope.

    I use AI CS5 and I'm trying in vain to get a result of technical drawing with ONE single line drawn uniform thickness of a single comic line scanned in a Photoshop file. I try NOT to get a calligraphic line that runs end-blob-thick-blob-end again, and then becomes two parallel unbound, goes back to thick end. It may seem drawn by hand and artsy; That's fine, but this isn't what I hope. I want a path unique 1pt standard with no double section (supposed to be indicated). That's all I can get using the setting of "Technical drawing" of furshlugginer. Is this normal? If so, my boy, I have a feature request for Adobe! I realize that there will be occasional corners and feet which will become mapped out blobs that I'll need to lop, and I can handle this, but how do I draw a single line, the scanner, then tracing, to achieve a uniform line, as most of the real, actual, technical drawings I've seen? Or do I have a problem copy of CS5?

    I'm sure that this question was answered correctly somewhere between 2011 and 2016 (now), but in my search for the answer to this question, it's at the top of the list of Google search.

    Birck issue was to apply a single line of a drawing to simple line n/b. Given that you have a reasonably well resolved image, it seems that the best way to 'say' HERE you don't want to the contour of the whole width in pixels of a line is change the "Tracing Options/settings setting in the"PX"box for a low setting. For example; I had a TIFF image of 600 dpi to a line drawing, who read '600 px' when inserted. I just changed to "150 px", press "develop" and "Viola" - a single vector spline which was centered on the black line.

    Never he asked?

  • the trace of tkprof output

    Hello

    I need clarification on the costing

    I have the following query
    DECLARE
            type array is table of t%ROWTYPE index by binary_integer;
            l_data array;
            l_rec t%rowtype;
    BEGIN
            SELECT
                    a.*
                    ,RPAD('*',4000,'*') AS PADDING1
                    ,RPAD('*',4000,'*') AS PADDING2
            BULK COLLECT INTO
            l_data
            FROM ALL_OBJECTS a;
            DBMS_MONITOR.SESSION_TRACE_ENABLE ( waits=>true );
            FOR rs IN 1 .. l_data.count
            LOOP
                    BEGIN
                            SELECT * INTO l_rec FROM t WHERE object_id = l_data(rs).object_id;
                    EXCEPTION
                      WHEN NO_DATA_FOUND THEN NULL;
                    END;
            END LOOP;
    END;
    tkprof output shows
    SQL ID: 78kxqdhk1ubvq
    Plan Hash: 3995659421
    SELECT * 
    FROM
     T WHERE OBJECT_ID = :B1 
    
    
    call     count       cpu    elapsed       disk      query    current        rows
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    Parse        1      0.01       0.00          1         63          0           0
    Execute  72184      0.34       1.03          9         54          0           0
    Fetch    72184      0.46     157.98      81365     368657          0       71726
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    total   144369      0.82     159.02      81375     368774          0       71726
    
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 93     (recursive depth: 1)
    
    Rows     Row Source Operation
    -------  ---------------------------------------------------
          1  TABLE ACCESS BY INDEX ROWID T (cr=5 pr=11 pw=0 time=0 us cost=4 size=8092 card=1)
          1   INDEX UNIQUE SCAN T_PK (cr=3 pr=6 pw=0 time=0 us cost=2 size=0 card=1)(object id 83085)
    
    
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      Disk file operations I/O                        3        0.00          0.00
      db file sequential read                     12464        0.07         92.18
      db file scattered read                      14590        0.07         63.10
    ********************************************************************************
    
    Now looking at stat line, does that mean the cost to retrieve one single record via unique index scan is 11 Physical block reads? The loop did fetch 72,726 rows and there were 81,375 physical block reads.
    
    
    *** 2012-01-27 10:18:51.978
    SELECT * FROM T WHERE 
    call     count       cpu    elapsed       disk      query    current        rows
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    Parse        0      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      0.00       0.00          0          5          0           1
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    total        2      0.00       0.00          0          5          0           1
    
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 93     (recursive depth: 1)
    ********************************************************************************
    
    DECLARE
            type array is table of t%ROWTYPE index by binary_integer;
            l_data array;
            l_rec t%rowtype;
    BEGIN
            SELECT
                    a.*
                    ,RPAD('*',4000,'*') AS PADDING1
                    ,RPAD('*',4000,'*') AS PADDING2
            BULK COLLECT INTO
            l_data
            FROM ALL_OBJECTS a;
            DBMS_MONITOR.SESSION_TRACE_ENABLE ( waits=>true );
            FOR rs IN 1 .. l_data.count
            LOOP
                    BEGIN
                            SELECT * INTO l_rec FROM t WHERE object_id = l_data(rs).object_id;
                    EXCEPTION
                      WHEN NO_DATA_FOUND THEN NULL;
                    END;
            END LOOP;
    END;
    
    call     count       cpu    elapsed       disk      query    current        rows
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    Parse        0      0.00       0.00          0          0          0           0
    Execute      1      6.77      11.53        318      48684          0           1
    Fetch        0      0.00       0.00          0          0          0           0
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    total        1      6.77      11.53        318      48684          0           1
    The summary statistics above do refers to the execution of the whole of the PL/SQL block? That means that the 318 blocks read above referred to.

    Thank you very much

    In addition to the excellent response of Rene, you will want to note that

    SELECT *
    FROM
     T WHERE OBJECT_ID = :B1 
    
    call     count       cpu    elapsed       disk      query    current        rows
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    Parse        1      0.01       0.00          1         63          0           0
    Execute  72184      0.34       1.03          9         54          0           0
    Fetch    72184      0.46     157.98      81365     368657          0       71726
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    total   144369      0.82     159.02      81375     368774          0       71726
    
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 93     (recursive depth: 1)
    
    Rows     Row Source Operation
    -------  ---------------------------------------------------
          1  TABLE ACCESS BY INDEX ROWID T (cr=5 pr=11 pw=0 time=0 us cost=4 size=8092 card=1)
          1   INDEX UNIQUE SCAN T_PK (cr=3 pr=6 pw=0 time=0 us cost=2 size=0 card=1)(object id 83085)
    

    This means that the cost to retrieve a record by making table T scan limited unique index is 11 physical blocks that includes 6 from the unique index of object_id. The execution plan has a hierarchical structure, and parents I/O, cost, schedule, etc. is a sum of measures for all of its children and the parameters of the operation itself. In the light of the foregoing, "ACCESS BY ROWID TABLE INDEX" operation is the operation of parent and the "INDEX UNIQUE SCAN" is the operation of the child. Statistics of the child are rolled in the statistics of the parent. This calculation of rail costs to retrieve a line are the same for each 71726 rows. So if you look at your original trace file (it's a good idea to understand the functioning of the trace file) you will see a stat to retrieve this record as noted in the report of tkprof.

    To retrieve the 71726 lines it cost 0.82 s CPU and time elapsed 159,02 dry. There was 368774 logical block IO 81375 were block physical readings.
    Note the CPU and wait for the temporal offsets.

     Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      Disk file operations I/O                        3        0.00          0.00
      db file sequential read                     12464        0.07         92.18
      db file scattered read                      14590        0.07         63.10
    ********************************************************************************
    

    Thus to retrieve these files altogether, they were physical i/o 12 464 'db file sequential read' taking 92,18 dry (note e/s physical does NOT block!) and e/s in physics 14 590 'file db scattered read' taking 63,10 sec, each contributing to the wait time. "the db file sequential read" is usually a single e/s block, it's index reading. 'db file scattered read' is an e/s multiple blocks read and in this case, it represents the blocks read from table to retrieve a line. It seems that every row of the table t occupies more than one block.

    HTH,

    Mich

    Published by: Mich Talebzadeh on January 27, 2012 06:01

  • Interpreting the Trace file.

    Hi, I use 10.2.0.4.0 oracle version.

    I have some info to trace file as below, for one of the query. So how should I interpret the trace file? What is the problem in the application and scope of the improvements in the query? Please note that I withdrew the request and plans of the trace file, I've posted only the sections of waiting.
    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.
    ********************************************************************************

    But rewrite the SQL code will probably be irrelevant.

    If most of the numbers in the file plan and execution of trace is correct, then it is not more time is lost somewhere in the network that you send to 260 000 lines back and forward with a size of 15 lines extraction (the default in sql * more)?

    You must increase the size of mining significantly.

    And you can watch some of the writings of Charles Hooper on the monitoring network:
    http://hoopercharles.WordPress.com/category/network-monitoring/

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

    Hi all

    Was just going through the basic concepts...

    1 lines of the created table T1with 1000 in LMT block size of 8 k.
    2. followed enabled - change the context name of session set Event 10046 trace forever, level 12';
    3. done - select * from T1;
    "4 ALTER SYSTEM SET EVENTS ' trace 10046 name context off."

    Now I have not found any scatered db file read in trace, as select opted for full table scan... What is the problem here?

    I have found that sql * net messages in the trace file.

    -Yasser

    1. Yes, the table name (tt1 vs t1) is strange.

    2. in addition, from 10 g, your application would be sampled, dynamically, without collecting statistics. While sampled dynamcially, blocks would be loaded into the cache. Collect statistics, RAS buffer cache, then trace with Event 10046.

    ================================
    Dion Cho - Oracle Performance storyteller

    http://dioncho.WordPress.com (English)
    http://ukja.tistory.com (Korean)
    http://dioncho.blogspot.com (Japanese)
    http://ask.ex-EM.com (questions)
    ================================

  • TKPROF output - lines processed / rows in the table anomaly?

    Hello

    TKPROF confusion for me more...

    Oracle 10.2.0.4 on Windows Server 2003.

    I formatted my Trace SQL with TKPROF file and the first query that I am focusing me causes some confusion. It's here (the names have been changed to protect the innocent, but everything remains intact):
    ********************************************************************************
    
    SELECT A.COL1, A.COL2, MIN(A.COL3) AS 
      COL_SYNONYM 
    FROM
     OUR_TABLE A WHERE NVL(A.COL4, NVL(:B4 , -1)) = NVL(:B4 , 
      NVL(A.COL4, -1)) AND NVL(A.COL5, NVL(:B3 , -1)) = NVL(:B3 , 
      NVL(A.COL5, -1)) AND A.COL6 = NVL(:B2 , A.COL6) AND 
      A.COL7 = NVL(:B1 , 1) GROUP BY A.COL1, A.COL2 ORDER 
      BY A.COL1, A.COL2
    
    
    call     count       cpu    elapsed       disk      query    current        rows
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    Parse        1      0.00       0.00          0          0          0           0
    Execute     83      0.01       0.01          0          0          0           0
    Fetch       83      1.01       1.11         12       3154          0      260371
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    total      167      1.03       1.13         12       3154          0      260371
    
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 148  (OUR_SCHEMA)   (recursive depth: 2)
    
    Rows     Row Source Operation
    -------  ---------------------------------------------------
     260371  SORT GROUP BY (cr=3154 pr=12 pw=0 time=956798 us)
     260371   CONCATENATION  (cr=3154 pr=12 pw=0 time=1072560 us)
     260371    FILTER  (cr=3154 pr=12 pw=0 time=630121 us)
     260371     TABLE ACCESS FULL OUR_TABLE (cr=3154 pr=12 pw=0 time=306867 us)
          0    FILTER  (cr=0 pr=0 pw=0 time=201 us)
          0     TABLE ACCESS FULL OUR_TABLE (cr=0 pr=0 pw=0 time=0 us)
    
    
    Rows     Execution Plan
    -------  ---------------------------------------------------
          0  SELECT STATEMENT   MODE: ALL_ROWS
     260371   SORT (GROUP BY)
     260371    CONCATENATION
     260371     FILTER
     260371      TABLE ACCESS   MODE: ANALYZED (FULL) OF 'OUR_TABLE' 
                     (TABLE)
          0     FILTER
          0      TABLE ACCESS   MODE: ANALYZED (FULL) OF 'OUR_TABLE' 
                     (TABLE)
    
    
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      db file scattered read                          2        0.01          0.02
    ********************************************************************************
    What confuses me is that 'lines' (column 'lines' for the operation "Fetch" = * 260371 *, also 'lines' in the 'line Source operation' and "The execution Plan" = * 260371 *).

    Actual number of rows in the table = * 3138 *.


    I think that because we have performed 83 times, then the value of "lines" should be:
    83 x number_of_rows_in_table = 83 x 3138 = * 260454 *.

    What we have is 260371, who looks like me:
    3137 = 83 x 83 x ( number_of_rows_in_table - 1 )


    I misinterpreted the news (I guess I!)?

    Why seems to be number_of_rows_in_table - 1 ? (Or is it pure coincidence?)


    Kind regards

    ADOS

    That remains a record satisfied with the given list of a predicate in the WHERE clause?

    If this isn't the case, then I don't see anything wrong here.

  • Closure of a state machine in queue event with several parallel loops

    I am trying to find the best way to stop a program that consists of an architecture of State machine in line waiting for event with several parallel loops. Can anyone recommend the best way to achieve this in my attached VI? (To browse the forum, this seems to be a frequently asked question, but I have not found a solution that works for me.)

    I look forward to any comments on my as well code, if someone is willing to offer it.

    My program needs:

    If the user press the 'Stop' button, the program should prompt the user with "are you sure you want to stop the program?" and then return to a State of rest or move forward to stop the program. In addition if there is an error, the program should prompt the user to ' clear the error and continue, or stop the program. Then back to the idle state or move forward to stop the program.

    Architectural details:

    The program consists of 3 parallel loops: (1) a loop of event management that places different States of a queue of the State, (2) a State Machine that enters the State that is removed from the queue of the State and (3) a loop error/Shutdown, which deals with errors in the error queue management.

    During normal shutdown, where running handling loop in the case of event 'Program.Shutdown' and 'Shutdown' and the 'Idle' States are added to the queue of the State. In the state machine, the State of 'Stop' is invoked. Special "5000" error code is added to the queue of the error. In the loop of error handling and stopping, "5000" error triggered a prompt that asks the user if they want to stop the program. If the user chooses not to stop, a notifier StopNotif is sent to the State of 'Stop' and 'Program.Shutdown' event case with notification 'Go '. If the user decides to stop, the Notifier sends the notification "Stop". Loop and event management State Machine ends when they receive the notification "Stop".

    In case of error, the program behaves in the same way: If the user chooses to clear the error and continue, the program returns to the status "pending".

    HOWEVER - if the user chooses to stop the program, the program crashes. The author of the notification that is sent to stop the loop of events and State Machine management cannot be read because event Program.Shutdown and the stop State (which contain the function "Waiting to notify") are not active.

    I was able to activate the stop State by Queuing in the loop of error/Shutdown management. But I don't know how to activate the "Program.Shutdown" event by program and thus access the function "Waiting to notify" inside.

    I tried to put the function "Waiting to notify" outside the structure of the event, so the event-handling loop never ends. Placing timeouts on the "wait for declaring" and the structure of the event makes the programme of work, but I want to avoid using timeouts because I don't want to turn my event program into a program of polling stations. I would also avoid using variables or nodes property to stop loops, because that requires the creation of a control/indicator for something that the user does not need to interact with.

    Thank you!

    First of all, close the notifier outside loops with your queues.  Second, you must use a user event to send the message to the event structure loop so that it stop in the case of the stop on an error.

  • Minimize the application event.

    Hello dear developers.

    As up to now, I have another question regarding application development.

    When I drag to minimize application and tap it to restore full screen - events that are accountable? I can't find...

    BlackBerry Tablet OS 1.0.7, that was released this morning of 19 July 2011, there are ways to determine relieably the State of the application or window is.

    There are 2 States of different applications

    1 assets

    2. turn off

    Applications window has 3 States

    1. full screen

    2 miniature

    3 hidden

    It is important to understand that the query shows don't get maps not always directly to the window of its States.

    This is the race to the bottom of what the average window States.

    Normal

    Your application window is full screen on the device and is active.

    Vignette

    Your application window has been thumbnailed. That would happen if the user crept upward from the bottom to reduce the application or we slide left and right to switch between applications.

    Hidden

    Your application window is not visible on the screen at all. This usually means that there is another application that is full screen.

    Here's what the code looks like that will allow you to listen to different State on a window changes.

    
            var win:IowWindow = IowWindow.getAirWindow();
            win.addEventListener(IowWindowEvent.WINDOW_STATE_CHANGED, stateChanged );
    
            function stateChanged(event:IowWindowEvent):void
            {
                switch( win.state )
                {
                    case IowWindowState.NORMAL:
                        trace( "app is full screen" );
                        break;
                    case IowWindowState.THUMBNAIL:
                        trace( "app is minimized" );
                        break;
                    case IowWindowState.HIDDEN:
                        trace( "app is hidden" );
                        break;
                }
            }
    

    2 important things to note.

    1 this update does not require an SDK Update and works in 1.0.7.

    2. it works through window in an application and your main window and the window on the screen HDMI aura of States, if you're not in mirror mode.

    Hope this helps

  • Need help for analysis "plan and background events waiting" on the report statspack for oracle database 11.2.0.4 on AIX

    HI: I analyze the STATSPACK report: this is the "volume test" on our UAT server for most of entry or "bind variables".  Our shared pool is well used in oracle.  Recovery of Oracle logs is not configured properly on this server, as in "Top 5 events of waiting", there are 2 for Oder.

    I need to know what other information may be digging from of 'waiting in the foreground events' & ' background waiting events ", and which can help us better understand, in combination of ' Top 5 wait event, that how did the server test /?  It could be overwhelming. wait events, so appreciate useful diagnostic or analyses.  Database is oracle 11.2.0.4 updated from 11.2.0.3 on IBM AIX 64-bit, level 6.x system power


    STATSPACK report


    DB Id Instance Inst Num Startup Time Release RAC database


    ~~~~~~~~ ----------- ------------ -------- --------------- ----------- ---

    700000XXX XXX 1 22 April 15 12:12 11.2.0.4.0 no.


    Host name Platform CPU Cores Sockets (G) memory

    ~~~~ ---------------- ---------------------- ----- ----- ------- ------------

    dXXXX_XXX AIX-Based Systems (64-2 1 0 16.0)


    Snapshot Id Snap Snap time Sessions Curs/Sess comment

    ~~~~~~~~    ---------- ------------------ -------- --------- ------------------

    BEGIN Snap: 5635 22 April 15 13:00:02 114 4.6

    End Snap: 5636 22 April 15 14:00:01 128 8.8

    Elapsed time: 59.98 (mins) Av law Sess: 0.6

    DB time: 35,98 (mins) DB CPU: 19,43 (mins)


    Cache sizes Begin End

    ~~~~~~~~~~~       ---------- ----------

    Cache buffer: block 2 064 M Std size: 8 K

    Shared pool: 3 072 M Log Buffer: 13 632 K

    Load profile per second per Transaction per Exec by call

    ~~~~~~~~~~~~      ------------------  ----------------- ----------- -----------

    DB Time (s): 0.0 0.6 0.00 0.00

    DB CPU: 0.0 0.3 0.00 0.00

    Size: 458 720,6 8,755.7

    Logical reads: 245,7 12 874,2

    Block changes: 1 356.4 25.9

    Physical reads: 6.6 0.1

    Physical writings: 61.8 1.2

    The user calls: 38.8 2 033,7

    Analysis: 286,5 5.5

    Hard analysis: 0.5 0.0

    Treated W/A Mo: 1.7 0.0

    Logons: 1.2 0.0

    Runs: 801,1 15.3

    Cancellations: 6.1 0.1

    Operations: 52.4


    Indicators of the instance

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Buffer % Nowait: 100.00 do NoWait %: 100.00

    Buffer % success: 99.98% W/A optimal, Exec: 100.00

    Library success %: 99,77% soft Parse: 99.82

    Run parse %: 64.24 latch hit %: 99.98

    Analyze the CPU to analyze Elapsd %: 53.15% Non-Parse CPU: 98.03


    Shared pool statistics Begin End

    ------  ------

    % Memory use: 10.50 12.79

    % SQL with executions > 1: 69,98 78,37

    % Memory for SQL w/exec > 1: 70.22 81,96

    Top 5 timed events Avg % Total

    ~~~~~~~~~~~~~~~~~~                                                   wait   Call

    Event waits time (s) (ms) time

    ----------------------------------------- ------------ ----------- ------ ------

    CPU time                                                       847          50.2

    ENQ: TX - 4 480 97 434 25.8 line lock conflict

    Log file sync 284 169 185 1 11.0

    log file parallel write 299 537 164 1 9.7

    log file sequential read 698 16 24 1.0

    Host CPU (processors: 2 hearts: Sockets 1: 0)

    ~ ~ ~ Medium load

    Begin End User System Idle WIO WCPU

    ------- -------   ------- ------- ------- ------- --------

    1.16 1.84 19.28 14.51 66.21 1.20 82.01


    Instance of CPU

    ~~~~~~~~~~~~                                       % Time (seconds)

    -------- --------------

    Host: Time (s) Total: 7,193.8

    Host: Availability of time processor (s): 2,430.7

    % of time host is busy: 33.8

    Instance: Time processor Total (s): 1,203.1

    % Busy CPU used, for example: 49.5

    Instance: Time of database total (s): 2,426.4

    % DB time waiting for CPU (resp. resources): 0.0


    Statistical memory Begin End

    ~~~~~~~~~~~~~~~~~                ------------ ------------

    Host Mem (MB): 16,384.0 16 384,0

    Use of LMS (MB): 7,136.0 7 136,0

    Use of PGA (Mo): 282.5 361.4

    Host % Mem used for SGA + PGA: 45.3 45.8

    Foreground wait events DB/Inst: XXXXXs Snaps: 5635-5636

    -> Only events with wait times Total (s) > =.001 are indicated

    --> sorted by Total desc waiting time, waits desc (idle last events)


    AVG % Total

    % Tim Total wait Wait Wait call

    Event is waiting for the time (s) (ms) /txn times

    ---------------------------- ------------ ---- ---------- ------ -------- ------

    ENQ: TX - line lock 4 480 0 434 97 contentio 0,0 25.8

    284 167 0 185 1 file synchronization log 1.5 11.0

    File I/O 8 741 of disk 0 4 operations 0.0 0.2

    direct path write 0 13 247 3 0.1 0.2

    DB file sequential read 6 058 0 1 0.0 0.1

    buffer busy waits 1 800 0 1 1 0,0.1

    SQL * Net more data to the client 29 161 0 1 0.2 0.1

    direct path read 7 696 0 1 0.0 0.0

    db file scattered read 316 0 1 2 0,0.0

    latch: shared pool 144 0 0 2 0,0.0

    Initialization of 30 0 0 3 0,0.0 CSS

    cursor: hand 10 0 0 9 0,0.0 S

    lock row cache 41 0 0 2 0,0.0

    latch: rank objects cache 19 0 0 3 0,0.0

    log file switch (private 8 0 0 7 0,0.0 str

    library cache: mutex X 28 0 0 2 0,0.0

    latch: cache buffers chains 54 0 0 1 0,0.0

    free lock 290 0 0 0.0 0.0

    sequential control file read 1 568 0 0 0.0 0.0

    switch logfile (4 0 0 6 0,0.0 control point

    Live sync 8 0 0 3 0,0.0 road

    latch: redo allocation 60 0 0 0 0.0.0

    SQL * Net break/reset for 34 0 0 1 0,0.0 customer

    latch: enqueue hash chains 45 0 0 0 0.0.0

    latch: cache buffers lru chain 7 0 0 2 0,0.0

    latch: allowance 5 0 0 1 0,0.0 session

    latch: object queue header 6 0 0 1 0,0.0 o

    Operation of metadata files ASM 30 0 0 0 0.0.0

    latch: in memory of undo latch 15 0 0 0.0 0.0

    latch: cancel the overall data 8 0 0 0 0.0.0

    SQL * Net client message 6 362 536 0 278 225 44 33.7

    jobq slave wait 7 270 100 3 635 500 0.0

    SQL * Net more data to 7 976 0 15 2 0,0 clien

    SQL * Net message to client 6 362 544 0 8 0 33.7

    -------------------------------------------------------------

    Context of the DB/Inst events waiting: XXXXXs clings: 5635-5636

    -> Only events with wait times Total (s) > =.001 are indicated

    --> sorted by Total desc waiting time, waits desc (idle last events)

    AVG % Total

    % Tim Total wait Wait Wait call

    Event is waiting for the time (s) (ms) /txn times

    ---------------------------- ------------ ---- ---------- ------ -------- ------

    log file parallel write 299 537 0 164 1 1.6 9.7

    log file sequential read 698 0 16 24 0.0 1.0

    db file parallel write 9 556 0 13 1 0,1.8

    146 0 10 70 0,0.6 startup operating system thread

    control file parallel write 2 037 0 2 1 0,0.1

    Newspaper archive e/s 35 0 1 30 0,0.1

    LGWR wait for redo copy 2 447 0 0 0.0 0.0

    async file IO DB present 9 556 0 0 0.1 0.0

    DB file sequential read 145 0 0 2 0,0.0

    File I/O disk 349 0 operations 0 0.0 0.0

    db file scattered read 30 0 0 4 0,0.0

    sequential control file read 5 837 0 0 0.0 0.0

    ADR block lu file 19 0 0 4 0,0.0

    Block ADR file write 5 0 0 15 0,0.0

    direct path write 14 0 0 2 0,0.0

    direct path read 3 0 0 7 0,0.0

    latch: shared pool 3 0 0 6 0,0.0

    single log file write 56 0 0 0.0 0.0

    latch: redo allocation 53 0 0 0 0.0.0

    latch: 1 0 0 3 0,0.0 active service list

    free latch 11 0 0 0 0.0.0

    CPI of RDBMS 5 314 523 57 189 182 1.7 message

    Space Manager: slave wa slowed 4 086 88 18 996 4649 0.0

    DIAG idle wait 7 185 100 1000 7 186 0.0

    Streams AQ: waiting time 2 50 4 909 # 0,0

    Streams AQ: qmn slowed slave 129 0 3 612 28002 0.0 w

    Streams AQ: Coordinator of the 258 50 3 612 14001 0,0 qmn

    SMON timer 2 43 3 605 83839 0.0

    PMON timer 99 1 199 2999 3 596 0.0

    SQL * Net client message 17 019 0 31 2 0.1

    SQL * Net message to client 12 762 0 0 0.1 0

    class slaves wait 28 0 0 0 0.0

    Thank you very much!

    Hello

    I think that your CPU is overloaded by your stress tests. You have one VCPU with 2 wires (2 LCPU), right? And the load average is greater than one. You have time DB which is not counted in (CPU time + wait events) and which comes no doubt from time spent in the runqueue.

    > Oracle recovery logs is not properly configured on this server, as in "Top 5 events of waiting", there are 2 for oder

    It is an error in statspack for show "log file parallel write here." This moment is historical and is included in 'log file sync '. And I don't think you have to redo misconfiguration. Waiting for 1ms to commit is ok. In OLTP you should have more than one validation in a user interaction so that the user don't worry not about 1 m in batch mode, unless you commit to each row, 1 DC to commit should not increase the total execution time.

    The fact that you have a lot of line lock (enq: TX - line lock conflict) but very little time (on average 97 ms) is probably a sign that testers are running simultaneously a charge affecting the same data. Their set of test data is perhaps too simple and short. An example: when stress tests of an order entry system if you run 1000 concurrent sessions, ordering the same product to the same customer, you can get this kind of symptoms, but the test we unrealistic.

    It's a high activity of 2000 calls per second, 52 transactions per second, user. But you also have low average active sessions, so the report probably covers a period of non-uniform activity, which makes the averages without meaning.

    So note to tell about the events of waiting here. But we don't have any info about 39% of DB time devoted to the CPU which is where something can be improved.

    Kind regards

    Franck.

Maybe you are looking for