Resource consumption details not shown for each row source operation

Hi Friends,
I have generated a tracefile for a query as shown below.
set autotrace traceonly arraysize 100
ALTER SESSION SET optimizer_mode = ALL_ROWS ;
alter session set tracefile_identifier = 'trcwithtime_221010_03';
alter session set events '10046 trace name context forever, level 12';
spool on
spool C:\Sree\trcwtime.log
-- put your statement here
SELECT e.*,d.dname
FROM scott.emp e
    ,scott.dept d
WHERE e.deptno = d.deptno;
spool off;
exitBelow is the trace file
SELECT e.*,d.dname
FROM scott.emp e
    ,scott.dept d
WHERE e.deptno = d.deptno
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        2      0.00       0.00          4          7          0          14
total        4      0.00       0.00          4          7          0          14
Misses in library cache during parse: 0
Optimizer goal: ALL_ROWS
Parsing user id: 173 
Rows     Row Source Operation
     14  HASH JOIN 
      4   TABLE ACCESS FULL DEPT
     14   TABLE ACCESS FULL EMP
Elapsed times include waiting on following events:
  Event waited on                             Times   Max. Wait  Total Waited
  ----------------------------------------   Waited  ----------  ------------
  SQL*Net message to client                       2        0.00          0.00
  db file sequential read                         4        0.00          0.00
  SQL*Net message from client                     2        0.41          0.77
********************************************************************************For each rowsource operation, resource consumption details (cr,pr,pw,time) are not shown in the TKPROF output.
How can i get these details as well?
DBVersion: 9.2.0.8
Regards,
Sreekanth Munagala

Sreekanth Munagala wrote:
For each rowsource operation, resource consumption details (cr,pr,pw,time) are not shown in the TKPROF output.
How can i get these details as well?
DBVersion: 9.2.0.8You can get those details by setting values for following parameters (at session level, preferably) before generating the 10046 trace.
ALTER SESSION SET statistics_level = ALL ;
ALTER SESSION SET timed_statistics = TRUE ;

Similar Messages

  • Formula Variable for Each Row

    Is there any way to make the formula variable take different values for different rows in a given report?  Our requirement is that each sales division in US will be approved of a certain percentage of rebate that it can use.  In the report one should see the net sales value after considering the % rebate.  For e.g., US has East, West, South, Central and Midwest Sales Divisions.  There are 5 product lines, prod1 to prod5.  The client will maintain a Z table for all the combinations of Sales division and Product line (i.e., East & prod1 - 10%, East & prod2 - 3%...  Midwest & prod5 - 5%).  Actual sales done in each sales division will not have these rebates considered.  So at the corporate level when the report is executed, the query should be able to apply the corresponding values to the actual sales.  Is it possible with BEx?  As far as I know, the user exit is not executed for each row.  Hope I was lucid enough to explain the problem at hand and if anyone has any effective ideas on this issue, please post your thoughts here.  Thanks a ton in advance.
    IS

    Hi,
    I doubt that you'll be able to do it in BEx.
    The easiest way is to include a rebate into your infoprovider.
    Best regards,
    Eugene

  • Upload a file where no. of columns for each row is not fixed...

    Hi All,,
    I have to upload a file......
    number of columns for each rows are not fixed ....
    e.g.
    Posting Date     Company Code     Currency     Header Text     Cost Center     Internal Order     Ref 1     Ref 2     Line Text     Account no.     Amount     Account no.     Amount     Account no.     Amount     Account no.     Amount     Account no.     Amount     Account no.     Amount     Account no.     Amount
    31-05-09     1000     EUR     PAYROLL 05/2009     1234     123456     123456     seaman     RU     999999     9,999.99                                                            
    31-08-09     1000     EUR     PAYROLL 05/2009     678     98765     98765     officer     GB     600015     4,560.00      600035     2,125.50      600020     1,325.40      600025     245.75      600030     300.00      280010     1,000.00      281091     6,000.00
    its in tab delimited txt file.....
    how to upload this type of file..
    Plz suggest....
    thnx
    rahul

    Hi,
    Define your internal table like this.
         TYPES: BEGIN OF upload_type,
           upload(330),
           END OF upload_type.
    DATA: itab_upload TYPE STANDARD TABLE OF upload_type,
           wa_upload TYPE upload_type.
    Data: file type string.
    file = 'C:/test.txt'.
      CALL FUNCTION 'GUI_UPLOAD'
           EXPORTING
                filename                = file
                filetype                = 'ASC'
               HAS_FIELD_SEPARATOR = 'X'
           TABLES
                data_tab                = itab_upload
           EXCEPTIONS
                file_open_error         = 1
                file_read_error         = 2
                no_batch                = 3
                gui_refuse_filetransfer = 4
                invalid_type            = 5
                no_authority            = 6
                unknown_error           = 7
                bad_data_format         = 8
                header_not_allowed      = 9
                separator_not_allowed   = 10
                header_too_long         = 11
                unknown_dp_error        = 12
                access_denied           = 13
                dp_out_of_memory        = 14
                disk_full               = 15
                dp_timeout              = 16
                OTHERS                  = 17.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    Use the sring operations to identify your coloumns.
    Regards,
    Satish

  • How can i show item schedule line details in Tableview for each line item

    Hai all,
      I need to display schedule line details  in Tableview for each line item.for example in each row i need to put one column along with button , if i click on this table that row  should be expand vertically and must show all schedule line details in that.if i click my button again the visible expanded row should disappear...
    if anybody works on this previously plz send some sample code...
    leoiz....

    To modify rows the best way is with the Iterator (do a search in the weblogs for "Iterator")
    However for what you want to do I've only seen this really work successfully with a standard HTML table not using the tableView.

  • Check Box for each row in report -- all rows deleting when pressing DELETE

    Hello experts! I have set up a report with a check box for each row. When I click the DELETE button to delete the selected rows, every single one of the rows get deleted...even the ones that are not selected. I have my process point set to "On Submit - After computations and validations".
    This is my delete process (SHG is the table and SHG_ID is the primary key):
    FOR i in 1..HTMLDB_APPLICATION.G_F01.count
    LOOP
    DELETE FROM SHG
    WHERE SHG_ID = HTMLDB_APPLICATION.G_F01(i);
    END LOOP;
    Also, I've added to query in the region source this line:
    htmldb_item.checkbox(1, SHG_ID) del,
    Where does the "1" come into this? Not sure what I am doing wrong!
    Message was edited by:
    user477193
    Message was edited by:
    user477193

    The 1 (first argument to all the htmldb_item.* APIs) corresponds to the array number in htmldb_application.g_fNN. So 1 will populate array g_f01, 2 will populate g_f02 and so on.
    Your code seems fine, it should delete only the checked rows. Are you sure there is no other process on the page that might be deleting the rows? See if you can put up an example on htmldb.oracle.com

  • Results not updating for every row in BIpublisher

    Hi all I have a Bi publisher report that is updating the results for the first row and in the second row to update the results it is picking the values from the first column itself and using the same values for all the other rows.
    Here is my report format
    Month saves Total, for 30,60,90,120
    Jan
    feb
    Mar
    Total are the enrolls by each month and days shows after 30,60,90,120 how many are still active. Following eg should give an idea of exactly whats happening
    Eg:
    Total 30days 60days 90days 120days 150days 180days 210days
    ------------------------------------------------------------------------------------------------------------------------------------------------------------ Jan saves 330 287 274 270 263 262 259 257
    Feb saves 298 255 242 238 231 230 227 225
    Mar saves 291 248 235 231 224 223 220 218
    So what is happening is lets say for example there are a total of 330 enrolls in january and after 30days 287 are still active and after 60days 274 are still active after 90 270...... etc
    Am getting the January active values correctly.
    BUt going forward when I see the values for february The total enrolls for february is 298 and after 30 days which are active is not giving me the correct.
    It is substracting the same amount as jan. looking at the numbers it is substracting
    -43, -13,-4,-7,-1,-3,-2 for Jan which are the cancels after the consecutive days
    It is substracting the same amount for feb also but my actual cancels for feb are different it should be 45,12,8,9,2,2,
    It is doing the same for all the months.
    There should be a change in the code. Following is the XSL code am using in
    <?xdoxslt:set_variable($_XDOCTX, 'v_SavesCanceled', SAVES_CANCELED_COUNT)?>
    <?xdoxslt:set_variable($_XDOCTX, 'v_RtSaves', xdoxslt:get_variable($_XDOCTX, 'v_RtSaves') - xdoxslt:get_variable($_XDOCTX, 'v_SavesCanceled'))?>
    <?xdoxslt:get_variable($_XDOCTX, 'v_RtSaves')?>
    Actually the cancels should be updated for each row but its picking the same cancels for every month.
    Hope it is clear let me know if you need any further info
    Any help is appreciated.
    Thanks

    Thank you very much for your help. The rtf file sent worked and updating results as required.Thank you
    Thanks

  • Drop Down List in a table - different options for each row

    How can i have a drop down list in a table with different options for each row?
    My requirement is this.. I want to display, say employee dtails in a table, and one column is employee hobbies, whcih can have multiple values and each employee may have a different list of hobbies. So how can we populate the drop down for each row, with different options?

    Hey. Uh, this probably isn't the answer you were looking for, but it sounds like you've got a problem with your database design there. Generally speaking, your tables shouldn't have multi-valued fields, in the relational model anyway (sql). Instead, you should look at adding a separate table like EMPLOYEE_HOBBIES. Then you have a foreign key using the employees primary key as the foreign key in the employee_hobbies table, see what I mean? I might have misunderstood your explanation though, I'm not sure.
    Alternatively, you could just have hobbies as a big freeform varchar field, and don't bother to make people separate their hobbies into different fields (you'd have to abandon the drop-down listbox idea in this case). If there's no really important reason to make the distinction, then it's probably easier just to not do it.

  • SQL merge and after insert or update on ... for each row fires too often?

    Hello,
    there is a base table, which has a companion history table
    - lets say USER_DATA & USER_DATA_HIST.
    For each update on USER_DATA there has to be recorded the old condition of the USER_DATA record into the USER_DATA_HIST (insert new record)
    - to have the history of changes to USER_DATA.
    The first approach was to do the insert for the row trigger:
    trigger user_data_tr_aiu after insert or update on user_data for each rowBut the performance was bad, because for a bulk update to USER_DATA, there have been individual inserts per records.
    So i tried a trick:
    Instead of doing the real insert into USER_DATA_HIST, i collect the USER_DATA_HIST data into a pl/sql collection first.
    And later i do a bulk insert for the collection in the USER_DATA_HIST table with stmt trigger:
    trigger user_data_tr_ra after insert or update on user_dataBut sometimes i recognize, that the list of entries saved in the pl/sql collection are more than my USER_DATA records being updated.
    (BTW, for the update i use SQL merge, because it's driven by another table.)
    As there is a uniq tracking_id in USER_DATA record, i could identify, that there are duplicates.
    If i sort for the tracking_id and remove duplicate i get exactly the #no of records updated by the SQL merge.
    So how comes, that there are duplicates?
    I can try to make a sample 'sqlplus' program, but it will take some time.
    But maybe somebody knows already about some issues here(?!)
    - many thanks!
    best regards,
    Frank

    Hello
    Not sure really. Although it shouldn't take long to do a test case - it only took me 10 mins....
    SQL>
    SQL> create table USER_DATA
      2  (   id      number,
      3      col1    varchar2(100)
      4  )
      5  /
    Table created.
    SQL>
    SQL> CREATE TABLE USER_DATA_HIST
      2  (   id      number,
      3      col1    varchar2(100),
      4      tmsp    timestamp
      5  )
      6  /
    Table created.
    SQL>
    SQL> CREATE OR REPLACE PACKAGE pkg_audit_user_data
      2  IS
      3
      4      PROCEDURE p_Init;
      5
      6      PROCEDURE p_Log
      7      (   air_UserData        IN user_data%ROWTYPE
      8      );
      9
    10      PROCEDURE p_Write;
    11  END;
    12  /
    Package created.
    SQL> CREATE OR REPLACE PACKAGE BODY pkg_audit_user_data
      2  IS
      3
      4      TYPE tt_UserData        IS TABLE OF user_data_hist%ROWTYPE INDEX BY BINARY_INTEGER;
      5
      6      pt_UserData             tt_UserData;
      7
      8      PROCEDURE p_Init
      9      IS
    10
    11      BEGIN
    12
    13
    14          IF pt_UserData.COUNT > 0 THEN
    15
    16              pt_UserData.DELETE;
    17
    18          END IF;
    19
    20      END;
    21
    22      PROCEDURE p_Log
    23      (   air_UserData        IN user_data%ROWTYPE
    24      )
    25      IS
    26          ln_Idx              BINARY_INTEGER;
    27
    28      BEGIN
    29
    30          ln_Idx := pt_UserData.COUNT + 1;
    31
    32          pt_UserData(ln_Idx).id     := air_UserData.id;
    33          pt_UserData(ln_Idx).col1   := air_UserData.col1;
    34          pt_UserData(ln_Idx).tmsp   := SYSTIMESTAMP;
    35
    36      END;
    37
    38      PROCEDURE p_Write
    39      IS
    40
    41      BEGIN
    42
    43          FORALL li_Idx IN INDICES OF pt_UserData
    44              INSERT
    45              INTO
    46                  user_data_hist
    47              VALUES
    48                  pt_UserData(li_Idx);
    49
    50      END;
    51  END;
    52  /
    Package body created.
    SQL>
    SQL> CREATE OR REPLACE TRIGGER preu_s_user_data BEFORE UPDATE ON user_data
      2  DECLARE
      3
      4  BEGIN
      5
      6      pkg_audit_user_data.p_Init;
      7
      8  END;
      9  /
    Trigger created.
    SQL> CREATE OR REPLACE TRIGGER preu_r_user_data BEFORE UPDATE ON user_data
      2  FOR EACH ROW
      3  DECLARE
      4
      5      lc_Row      user_data%ROWTYPE;
      6
      7  BEGIN
      8
      9      lc_Row.id   := :NEW.id;
    10      lc_Row.col1 := :NEW.col1;
    11
    12      pkg_audit_user_data.p_Log
    13      (   lc_Row
    14      );
    15
    16  END;
    17  /
    Trigger created.
    SQL> CREATE OR REPLACE TRIGGER postu_s_user_data AFTER UPDATE ON user_data
      2  DECLARE
      3
      4  BEGIN
      5
      6      pkg_audit_user_data.p_Write;
      7
      8  END;
      9  /
    Trigger created.
    SQL>
    SQL>
    SQL> insert
      2  into
      3      user_data
      4  select
      5      rownum,
      6      dbms_random.string('u',20)
      7  from
      8      dual
      9  connect by
    10      level <=10
    11  /
    10 rows created.
    SQL> select * from user_data
      2  /
            ID COL1
             1 GVZHKXSSJZHUSLLIDQTO
             2 QVNXLTGJXFUDUHGYKANI
             3 GTVHDCJAXLJFVTFSPFQI
             4 CNVEGOTDLZQJJPVUXWYJ
             5 FPOTZAWKMWHNOJMMIOKP
             6 BZKHAFATQDBUVFBCOSPT
             7 LAQAIDVREFJZWIQFUPMP
             8 DXFICIPCBCFTPAPKDGZF
             9 KKSMMRAQUORRPUBNJFCK
            10 GBLTFZJAOPKFZFCQPGYW
    10 rows selected.
    SQL> select * from user_data_hist
      2  /
    no rows selected
    SQL>
    SQL> MERGE
      2  INTO
      3      user_data a
      4  USING
      5  (   SELECT
      6          rownum + 8 id,
      7          dbms_random.string('u',20) col1
      8      FROM
      9          dual
    10      CONNECT BY
    11          level <= 10
    12  ) b
    13  ON (a.id = b.id)
    14  WHEN MATCHED THEN
    15      UPDATE SET a.col1 = b.col1
    16  WHEN NOT MATCHED THEN
    17      INSERT(a.id,a.col1)
    18      VALUES (b.id,b.col1)
    19  /
    10 rows merged.
    SQL> select * from user_data_hist
      2  /
            ID COL1                 TMSP
             9 XGURXHHZGSUKILYQKBNB 05-AUG-11 10.04.15.577989
            10 HLVUTUIFBAKGMXBDJTSL 05-AUG-11 10.04.15.578090
    SQL> select * from v$version
      2  /
    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 Linux: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - ProductionHTH
    David

  • Calling a stored procedure for each row returned

    I need to call a stored procedure for each row returned by a repeating frame. I called the stored procedure from the repeating frame format trigger, but that did not work( it did no populated the tables populated by the stored procedure)
    How can I call a stored procedure for each row returned by a repeating frame.
    Thank you

    Include it as a formula column in your data model.

  • Adding a check box control for each row of data in a DataModel

    Hi all,
    I need to add a checkbox control for each row of data on a DataModel object.
    I have a "commandButton" at the bottom of DataModel, and whenever someone checks some of the rows on that list of rows,
    I need to get the selected dataModel(fragment of the list) in my backing bean.
    How do I achieve this functionality in JSF?
    Thanks,
    Meghasyam.

    Hi all,
    I need to add a checkbox control for each row of data
    on a DataModel object.
    I have a "commandButton" at the bottom of DataModel,
    and whenever someone checks some of the rows on that
    list of rows,
    I need to get the selected dataModel(fragment of the
    list) in my backing bean.
    How do I achieve this functionality in JSF?
    Thanks,
    Meghasyam.You'll want to have a wrapper class as suggested above, which has a "selected" boolean in it. Then use the "binding" attribute of the h:selectBooleanCheckbox component to bind the checkbox to that property... Make the property public and specify the properties exact name in the binding... bindings do not append "get" to the EL.
    Here is an example of what your table might look like... This code would display the list of names with a checkbox to the left of each name... When the check box is selected, the "selected" property of that wrapper class is set to true or false as needed. Then when the form is submitted, and you are inside your actionListener or action method call, you can look through your collection of wrapper classes asking each one if it was selected or not... Then do whatever you want with them... In this example, replace "myBackingBean" with the name of your backing bean, and "names" with the name of the method in your backing bean which returns the collection of wrapper classes... create a flag "public boolean selected" or similar in your wrapper class..
    <h:dataTable id="namestable"
    value="#{myBackingBean.names}"
    var="aName">
    <h:column>
    <h:selectBooleanCheckbox binding="#{aName.selected}"/>
    <h:outputText value="#{aName.nameText}"/>
    </h:column>
    </h:dataTable>
    Let me know if that isn't clear enough and I'll see if I can find a better way to explain it...
    -Garrett

  • Raise expection for each row if returned set contains x

    Hello Guys,
    I have the following code and almost gave up on the idea to raise an exception and print
    a line for each row where the sales price is < 10. I know how this works with a CURSOR but I want to try it without it. Thinking about it let me to the conclusion that this is not possible to act on individual row results on a set based operation. I will have to use a CURSOR (not set based so I can look at each row).
    Am I thinking correctly?
    (Code example deleted due to confusion)
    Code example deleted due to confusion
    Edited by: metalray on 10.11.2010 01:07

    Hi 3360,
    I am using PL/SQL. I can make my point without any code.
    The question, in a different format is this:
    Can I throw an whatever exception (or dbms_output put line) for individual rows WITHOUT using a cursor.
    My answer (and I just need clarification on this):
    *(1)* No, because anything apart from a cursor is set-based and set-based operations (select, join, union)
    can not through exceptions on individual rows.
    *(2)* Yes, you can have a DBMS_OUTPUT.PUT_LINE with whatever exception on a set based operation
    for each individual row that causes the exception (I dont think this answer is true :)
    @Agustin UN, thanks for that. I know that is possible :) The problem is,
    that I dont think I can print or fetch each individual row that causes the "exception" since
    it is treated as a set. - I am welcome for someone to tell me that it work nevertheless

  • Updating A Table in a for each row trigger

    I have a trigger,
    create or replace trigger ins_ibpm_temp_trig
    after update of ethic_dt on ethics_approval_info for each row
    My issue is that I need to update the ethics_approval_info for each record based on the ethics date that was updated. I am getting the error
    ORA-04091: table ORACLETEST.ETHICS_APPROVAL_INFO is mutating, trigger/function may not see it.
    So the issue here of course is that I am trying to update a table, that is already in the middle of updating. Is there any way to get around this?

    Try these links
    Link1
    Link2
    Regards,
    Abdetu..

  • Update button in sql report for each row can only get the report value

    I have to added Update for each row of records like:
    select a.*,'Update' button from (
    select c.*,d.login from country c,champ d
    where c.champ_id=d.champ_id(+)
    order by c.name) a
    then go to the report->edit button ->Column Link
    I added some items P40_REGION, P40_CHAMPID,P40_ACTIVE,P40_CODE and assign the value like #region#,#active# ,#code# to these item, but when I click the update button in the report I found the values such as #region#,#active# ,#code# is the report value not the select list selected value(the region, active column are displayed as select list lov).
    Can anyone tell me how to sort this knid of problem?
    Thanks a lot!

    Sorry, it doesn't work. I also tried apex_application.g_f01(i), but not everytime I can get the value or get the incorrect value. If you have time you can try to create it like what I have described. Our team use two days now but still can not sort this problem.

  • How to limit the number of emails that are shown for each account

    Hi, I'm going from iOS 6.1 to my new 5s iOS 7 and I wanted to know if there was a way to limit the number of emails shown for each of my accounts? In iOS 6 there is a setting "show" where you can choose how many you would like to be loaded at a time from 50-1,000 , is there a setting similar to this and I am just not seeing it? Please help me asap. I have only logged in 3 of my 12 email accounts and already have over 13k emails loaded...

    You can't limit it to the last 50 messages, but you can limit it to the last 1000 messages in each "folder" (label).
    Go to the Gmail website and click on the gear icon to the top-right side.
    Click on Settings.
    Click on the "Forwarding and IMAP/POP" tab across the top of the Settings area.
    Towards the bottom of the IMAP section, change the "Folder Size Limit" setting to "Limit IMAP folders to contain no more than this many messages". By default 1000 is selected, though you can also choose 2000, 5000, or 10000.
    Click Save Changes at the bottom.

  • I have 2 blogs on my site, I need to customize Blog Post Details Layout diff for each???

    I have 2 blogs on my site, I need to customize Blog Post Details Layout diff for each???

    Hi,
    Unfortunately it is not possible to have multiple details layouts for your blog per site at this stage. 
    Kind regards,
    -Sidney

Maybe you are looking for

  • Downloading File from server

    I have written more or less same code like following to send file from server to browser in other web applications, where browser displays Save As dialog box to the user, but the same code doesn't work with portal. following code part of a page flow

  • Event Structure Question

    Hopefully I can explain this okay.... I'm using an event structure to control several features in my program and all have worked great.  All of the events in my program are handled via boolean buttons with value changed option.  I have a numeric cont

  • Grayscale PDF in InDesign

    Can I create a grayscale PDF of my color layout?

  • "Save Message" - in Task list - Planning 11.1.2.2.302.3

    Hi, We have implemented Planning 11.1.2.2.302.3 and following was asked from our customer. When I enter data (numbers) in the task list, I want to be warn with a pop up window, if I click "next" that "data are not save" --> - save yes or no-. As per

  • Where can I buy Director MX 2004

    I am looking into buying a copy of Director, but I want to buy Director MX 2004. I am hoping that since Director 11 is out, MX 2004 should be (a lot) cheaper, which is good being that since I am a student, I can't afford the full price. Does anyone k