How to change the explain plan for currently running query?

Hi All,
I am using Oracle enterprise 9i edition. I have a query which frames dynamically and running in the database. I noticed a table with 31147758 rows
in the query which has no indexes and taking more time to process. I tried to create an INdex on that table. I know the query is already running with a FULL table scan. Is it possible to change the explain plan for the current running query to consider the INDEX?
[code]
SELECT /*+ USE_HASH (c,e,b,a) */
d.att_fcc extrt_prod_dim_id,
d.att_fcc compr_prod_dim_id,
  a.glbl_uniq_id glbl_uniq_id,
  to_date(c.dit_code,'RRRRMMDD')STRT_DT,
  (to_date(c.dit_code,'RRRRMMDD')+150)END_DT,
  a.pat_nbr pat_id,
  a.rxer_id       rxer_id,
  e.rxer_geog_id  rxer_geog_id,
  a.pharmy_id pharmy_id,
  a.pscr_pack_id pscr_pack_id,
  a.dspnsd_pack_id dspnsd_pack_id,
  DENSE_RANK () OVER (PARTITION BY a.pat_nbr ORDER BY c.dit_code) daterank,
  COUNT( DISTINCT d.att_fcc ) OVER (PARTITION BY a.pat_nbr, c.dit_code) event_cnt
  DENSE_RANK () OVER (PARTITION BY a.pat_nbr,
d.att_fcc
  ORDER BY c.dit_code) prodrank,
  DENSE_RANK () OVER (PARTITION BY a.pat_nbr,
d.att_fcc
  ORDER BY c.dit_code DESC) stoprank
  FROM
  pd_dimitems c,
   pd_pack_attribs   d ,
    lrx_tmp_rxer_geog e,
    lrx_tmp_pat_daterank p,
    lrx_tmp_valid_fact_link     a
    WHERE c.dit_id = a.tm_id
    AND   e.rxer_id = a.rxer_id
    AND   a.glbl_uniq_id = p.glbl_uniq_id
    AND   p.daterank > 1
  AND   a.pscr_pack_id = d.att_dit_id
[/code]
The table lrx_tmp_pat_daterank is having that 31147758 rows. So I am wondering how to make the query to use the newly created index on the table?

Why do you think using Indexes will improve the performance of the query? How many rows this query is returning? Optimizer might chose a Full table scan when it finds out that Index plan might not be useful. Why are you using /*+ USE_HASH (c,e,b,a) */ hint? This Hint will force oracle to use Full table scan instead of using the index. Try removing it and see if the plan changes.
Regards,

Similar Messages

  • How to change the Display Pattern for Decimal Fields dynamically

    hi all,
    Can any one help me how to change the display pattern for decimal fields dynamically???
    Currently I am using z,zzz,zzz,zz9.999 Display pattern for Quantity Field. If the value is blank it is displaying as 0.000 on the Screen. But I don't want this to be printed.
    Please help me how to solve this ASAP.
    Thanks,
    Prabhu

    Hi,
    Alternatively you can handle it in the context.
    In the context area, click on the quantity. In the bottom, click on the conditions tab, and put a condition
    <quan field> NE initial.
    So the field will not be printed if there is no value.
    Regards,
    Vidya Chowdhary A.

  • How to change the sysadmin password for maintenance wizard if you have forg

    How to change the sysadmin password for maintenance wizard if you have forgotten the password and can't log in.

    Log into SQL*Plus as the $EOFUSER and do:
    update eof_user set password = 'passwd_you_want' where user_id = 0;
    commit;
    -Vikki
    Product and Development Manager for Maintenance Wizard

  • How to change the package name for a msg class

    Can anybody tell me how to change the package name for a message class.
    and how will it effect in the rerport?
    thanks in advance
    kp

    >>and how will it effect in the report?
    You wouldn't see any direct effect on the Report.. But if you transport the report to QA & leave the Message class in Dev, it might result in syntax issues & you will not be able to execute the report. Just ensure that both of them get transported to QA & you will be fine.
    ~Suresh

  • How to change the menu text for menu exit in Version 3.1i

    Hi,
    I am working on an enhancment in CJ02 transaction in 3.1i version. I have implimented menu exit for it , but I am unable to change the menu text for it.Please let me know how to change the menu text for that menu.
    Thanks
    Suman

    Hi Shree,
    Thanks for the response. Please find the Enhancement name here "CNEX0006".
    Thanks
    Suman

  • How to change the Safety Intervals for standard Content datasources

    Go to RSA2->give your datasource name ->setting up GEN delta
    It shows you whts the safety interval setting.
    <b>
    How to change the Safety Intervals for standard Content datasources since when I go to RSA2 edit and change options are always greyed out. let me know if there is any other transaction code or table to do this.</b>
    Thanks
    Soniya Kapoor

    Hi Soniya,
    1) try  RSA6.....also  RSA8 for additional info.
    2) useful link:
        http://help.sap.com/saphelp_nw04/helpdata/en/d0/4cc138944cfa06e10000000a11405a/content.htm
    Good luck, BB

  • How to change the account setting for App Store

    My last question wasn't so clear, so I would like to post again. I want to know how to change the account setting for App Store. I have changed in the Settings but it doesn't reflect in App Store.
    Thanks,

    once you sign out just click sign in and put the new email address in the "Username" field and your correct password then click OK
    it will look like it is doing nothing but give it time and it will sign you in with the new username.
    is it possible you have multiple itunes accounts?
    when you changed your itunes account from your me.com to your gmail.com address did you change it within the itunes Edit Account Info ('Store' menu then select 'View My Account', then sign in , select edit account info) or did you just create another itunes account?
    be well

  • How to change the browser used for Google search from context menu of selected text?

    How to change the browser used for Google search from context menu of selected text?
    It uses Safari. But I want to use Chrome (it's my default browser).

    How to change the browser used for Google search from context menu of selected text?
    It uses Safari. But I want to use Chrome (it's my default browser).

  • PURCHASING-How to change the next approver for the Purchase Requistion(PR)-

    Hi All,
    Could you please let me know how to change the next approver for the Purchase Requistion(PR) from User "X" to "Y", as Y was manager of "X" and 'X' left the organization. how can i acheive this? can you please let me know the process ?
    Thanks,

    Hi,
    You have not mentioned the version you are using (11i or R12).. Are you using iProcurement... ? Are you using positional or Employee-Supervisor hierarchy..?
    Your question : How to change the next approver for the Purchase Requistion(PR) from User "X" to "Y", as Y was manager of "X" and 'X' left the organization.
    Ans: You can achieve this through below workarounds
    - Through *"Mass Update of Requisitions" functionality* (Conc. request) you can update the Approver name from User "X" to "Y" for existing PRs.
    - Replacing the Supervisor name of the requestor/requisitioner in the HR record (assignment) from User "X" to "Y"..
    Hope it helps.
    Kind Regards,
    S.P DASH

  • How to change the "home" computer for a iPod touch 3G (iOS 4.2.1) and an iPad 2(iOS5)? Music library has been already moved to iTunes on the new computer.

    I have a iPod Touch (3rd gen) that has not upgraded it's OS beyond iOS4.2.1 even if I have tried connecting it into iTiunes I have a iPad2 which has been recently upgraded to iOS5 . Both were connected to a laptop computer that my husband will take with him when he moves to a different city. I will most probably buy a second laptop sometime, but meanwhile I want to tether my iPod touch and iPad 2 to my desktop PC for now. Before I took the plunge, I had a few questions which I am hoping this forum will help me answer
    1. How to switch the Home PC for these devices? I have already transfered my Music library on to my Home PC and then downloaded and reorganised with iTunes. Since I am reorganising the library anyway I don't minding removing all my music from the iTouch and set it up from scratch for the music. However, I removed all musci from theiTouch, changed it to manual mode and connected it to the desktop- It's detecting it fine- but it still is not the home computer for the iTouch- everytime I try to put new music in it- it is deleting everything old- I can't see the same controls as I see from the laptop at all- how to rectify this? To I need to set this up as a new iPod (restore route)?
    on the touch I have very few apps and don't care about them. on the iPad I do have a couple of valuable apps that I want to hold on to- so have n't tinkered with it at all- what is the smoothest way for thsi transition? The iPad doesn't have any music on it at this time, but what to do if I want to transfer some?
    2. Is there a way I can store the organised iTunes info in any way- like I said I might buy a new laptop in a few months but do not want to reorganise my iTunes over agaoin- it' a fairly large collection most of which is n't purchased from the iTunes store.
    3. Why sin't my iTouch 3G upgrading- it's stuck on iOS4.2.1 but iTunes doesn't show any updates- even with chck updates button iTunes show that it is a current version.
    thanks for reading through and any help that I can get to sort this mess out.

    The recent release of iBooks 1.2.1 has corrected the problem of the missing Dutton edition of Winnie-the-Pooh. It may have been there with the previous install of iBooks but it would never display in the bookshelf. After updating iBooks to 1.2.1, the Dutton version (the one included with iBooks) suddenly appeared on the bookshelf. So it was a software glitch after all and not a fix Apple chose to document explicitly in the update.
    Message was edited by: Rick Lang

  • How to change the table's for an existing report

    Hello,
    How can I change the table names for reports created with a different table name? for e.g If I created a report which included a table called "2009_10_example", How can I change that table to a different table "2010_10_example1".
    I am using Crystal reports 2008, and the reports were created using Report Creating Wizard.
    Thanks,
    Abhishek

    In the Database Menu, there is an option Set Datasource Location.  This allows you to pick a table from the current tables used, and select a table to replace it with.  Press the Update button, and Crystal will swap one for the other.  If the field names and data types are all the same, it will automatically change all references throughout the report to the new table's fields.
    May I suggest that your tables are set up improperly if you have to change report code to run it for different months?  The data should all be in one table with dates, and parameters to select the date range to report on.  (That was said in the spirit of helping...)
    HTH,
    Carl

  • DECODE is changing the explain plan

    I have a statement with a decode function in the where clause like this:
    AND decode(:cropcode,-1,'-1',sdu.u_crop_group) = decode(:cropcode,-1,'-1',:cropcode)When I a pass -1 as parameter for cropgroup the filter would result in "AND '-1' = '-1' and the statement is executed in less than 2 seconds. When I leave out this where clause it takes almost 18 seconds. The result is the same so I don't understand why the explain plan is so much different and why not using index scans in the statement without decode.
    Below the explain plans and tkprofs for 1 (without decode) and 2 (with decode).
    *explain 1*
    {code}
    SQL Statement which produced this data:
    select * from table(dbms_xplan.display)
    PLAN_TABLE_OUTPUT
    | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)|
    | 0 | SELECT STATEMENT | | 7080 | 2413K| | 43611 (2)|
    | 1 | SORT ORDER BY | | 7080 | 2413K| 5224K| 43611 (2)|
    |* 2 | FILTER | | | | | |
    |* 3 | HASH JOIN | | 7156 | 2438K| | 43075 (2)|
    | 4 | TABLE ACCESS FULL | DWH_ABS_DETERMINATION | 17745 | 363K| | 83 (0)|
    |* 5 | HASH JOIN OUTER | | 7156 | 2292K| | 42991 (2)|
    |* 6 | HASH JOIN | | 7156 | 1355K| | 42907 (2)|
    |* 7 | HASH JOIN | | 6987 | 1187K| | 19170 (2)|
    |* 8 | HASH JOIN | | 6947 | 963K| | 10376 (1)|
    |* 9 | TABLE ACCESS BY INDEX ROWID | ALIQUOT | 3 | 144 | | 3 (0)|
    | 10 | NESTED LOOPS | | 6907 | 897K| | 8577 (1)|
    |* 11 | HASH JOIN | | 2264 | 187K| | 1782 (2)|
    | 12 | TABLE ACCESS BY INDEX ROWID | SAMPLE | 190 | 4370 | | 17 (0)|
    | 13 | NESTED LOOPS | | 2264 | 152K| | 107 (1)|
    | 14 | NESTED LOOPS | | 12 | 552 | | 25 (0)|
    |* 15 | TABLE ACCESS FULL | SDG_USER | 12 | 288 | | 13 (0)|
    | 16 | TABLE ACCESS BY INDEX ROWID| SDG | 1 | 22 | | 1 (0)|
    |* 17 | INDEX UNIQUE SCAN | PK_SDG | 1 | | | 0 (0)|
    |* 18 | INDEX RANGE SCAN | FK_SAMPLE_SDG | 597 | | | 2 (0)|
    | 19 | TABLE ACCESS FULL | SAMPLE_USER | 1078K| 16M| | 1669 (1)|
    |* 20 | INDEX RANGE SCAN | FK_ALIQUOT_SAMPLE | 3 | | | 2 (0)|
    | 21 | TABLE ACCESS FULL | ALIQUOT_USER | 3403K| 29M| | 1781 (3)|
    | 22 | TABLE ACCESS FULL | TEST | 3423K| 104M| | 8775 (2)|
    |* 23 | TABLE ACCESS FULL | RESULT | 3435K| 65M| | 23718 (2)|
    | 24 | VIEW | PLATE | 21787 | 2851K| | 84 (2)|
    |* 25 | FILTER | | | | | |
    | 26 | TABLE ACCESS FULL | PLATE | 21787 | 574K| | 84 (2)|
    |* 27 | INDEX UNIQUE SCAN | PK_OPERATOR_GROUP | 1 | 7 | | 0 (0)|
    |* 28 | INDEX UNIQUE SCAN | PK_OPERATOR_GROUP | 1 | 7 | | 0 (0)|
    |* 29 | INDEX UNIQUE SCAN | PK_OPERATOR_GROUP | 1 | 7 | | 0 (0)|
    |* 30 | INDEX UNIQUE SCAN | PK_OPERATOR_GROUP | 1 | 7 | | 0 (0)|
    |* 31 | INDEX UNIQUE SCAN | PK_OPERATOR_GROUP | 1 | 7 | | 0 (0)|
    Predicate Information (identified by operation id):
    2 - filter(("GROUP_ID" IS NULL OR EXISTS (SELECT /*+ */ 0 FROM "LIMS"."OPERATOR_GROUP"
    "OPERATOR_GROUP" WHERE "OPERATOR_ID"="LIMS$OPERATOR_ID"() AND "GROUP_ID"=:B1)) AND ("GROUP_ID" IS NULL
    OR EXISTS (SELECT /*+ */ 0 FROM "LIMS"."OPERATOR_GROUP" "OPERATOR_GROUP" WHERE
    "OPERATOR_ID"="LIMS$OPERATOR_ID"() AND "GROUP_ID"=:B2)) AND ("GROUP_ID" IS NULL OR EXISTS (SELECT /*+
    */ 0 FROM "LIMS"."OPERATOR_GROUP" "OPERATOR_GROUP" WHERE "OPERATOR_ID"="LIMS$OPERATOR_ID"() AND
    "GROUP_ID"=:B3)) AND ("GROUP_ID" IS NULL OR EXISTS (SELECT /*+ */ 0 FROM "LIMS"."OPERATOR_GROUP"
    "OPERATOR_GROUP" WHERE "OPERATOR_ID"="LIMS$OPERATOR_ID"() AND "GROUP_ID"=:B4)))
    3 - access("U_ABS_DETERMINATION"="DETERMINATION_ASSIGNMENT")
    5 - access("PLT"."PLATE_ID"(+)="PLATE_ID")
    6 - access("TEST_ID"="TEST_ID")
    7 - access("ALIQUOT_ID"="ALIQUOT_ID")
    8 - access("ALIQUOT_ID"="ALIQUOT_ID")
    9 - filter("STATUS"='C' OR "STATUS"='P' OR "STATUS"='V')
    11 - access("SAMPLE_ID"="SAMPLE_ID")
    15 - filter("U_ABS_DETERMINATION" IS NOT NULL AND "U_CLIENT_TYPE"='QC' AND
    "U_WEEK_OF_PROCESSING"=TO_NUMBER(:WEEK) AND "U_YEAR_OF_SAMPLE_DELIVERY"=TO_NUMBER(:YEAR))
    17 - access("SDG_ID"="SDG_ID")
    18 - access("SDG_ID"="SDG_ID")
    20 - access("SAMPLE_ID"="SAMPLE_ID")
    23 - filter("NAME"='End result')
    25 - filter("GROUP_ID" IS NULL OR EXISTS (SELECT /*+ */ 0 FROM "LIMS"."OPERATOR_GROUP"
    "OPERATOR_GROUP" WHERE "OPERATOR_ID"="LIMS$OPERATOR_ID"() AND "GROUP_ID"=:B1))
    27 - access("GROUP_ID"=:B1 AND "OPERATOR_ID"="LIMS$OPERATOR_ID"())
    28 - access("GROUP_ID"=:B1 AND "OPERATOR_ID"="LIMS$OPERATOR_ID"())
    29 - access("GROUP_ID"=:B1 AND "OPERATOR_ID"="LIMS$OPERATOR_ID"())
    30 - access("GROUP_ID"=:B1 AND "OPERATOR_ID"="LIMS$OPERATOR_ID"())
    31 - access("GROUP_ID"=:B1 AND "OPERATOR_ID"="LIMS$OPERATOR_ID"())
    Note
    - 'PLAN_TABLE' is old version
    {code}
    *tkprof 1*
    {code}
    TKPROF: Release 10.2.0.3.0 - Production on Tue Jan 13 13:21:47 2009
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Trace file: C:\oracle\product\10.2.0\admin\nautp02\udump\nautp02_ora_880.trc
    Sort options: default
    count = number of times OCI procedure was executed
    cpu = cpu time in seconds executing
    elapsed = elapsed time in seconds executing
    disk = number of physical reads of buffers from disk
    query = number of buffers gotten for consistent read
    current = number of buffers gotten in current mode (usually for update)
    rows = number of rows processed by the fetch or execute call
    SELECT sdu.u_crop_group,
    sd.name as sdg_name,
    ad.variety_name,
    ad.batch_number,
    a.name as aliquot_name,
    sau.u_box_code as box_code,
    sau.u_box_position as box_position,
    t.name as test_name,
    r.original_result,
    plt.name as plate_name,
    concat(chr(a.plate_row + 64),a.plate_column) as plate_position,
    au.u_replicate_number as replicate_number
    FROM lims_sys.sdg sd,
    lims_sys.sdg_user sdu,
    lims_sys.sample sa,
    lims_sys.sample_user sau,
    lims_sys.aliquot a,
    lims_sys.aliquot_user au,
    lims_sys.test t,
    lims_sys.result r,
    lims_sys.plate plt,
    lims_sys.abs_determination ad
    WHERE sd.sdg_id = sdu.sdg_id
    AND sd.sdg_id = sa.sdg_id
    AND sa.sample_id = sau.sample_id
    AND sau.sample_id = a.sample_id
    AND a.aliquot_id = au.aliquot_id
    AND au.aliquot_id = t.aliquot_id
    AND t.test_id = r.test_id
    AND plt.plate_id (+) = a.plate_id
    AND sdu.u_abs_determination = ad.determination_assignment
    AND a.status IN ('V','P','C')
    AND r.name = 'End result'
    AND sdu.u_client_type = 'QC'
    AND sdu.u_year_of_sample_delivery = (:year)
    AND sdu.u_week_of_processing = (:week)
    --AND decode(:cropcode,-1,'-1',sdu.u_crop_group) = decode(:cropcode,-1,'-1',:cropcode)
    ORDER BY box_code, box_position, replicate_number
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 1.15 1.16 0 0 0 0
    Fetch 1 8.53 16.10 227649 241266 0 500
    total 3 9.68 17.27 227649 241266 0 500
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 97
    Rows Row Source Operation
    500 SORT ORDER BY (cr=241266 pr=227649 pw=0 time=16104631 us)
    21311 FILTER (cr=241266 pr=227649 pw=0 time=16246749 us)
    21311 HASH JOIN (cr=241266 pr=227649 pw=0 time=16225434 us)
    17745 TABLE ACCESS FULL DWH_ABS_DETERMINATION (cr=374 pr=0 pw=0 time=69 us)
    21311 HASH JOIN RIGHT OUTER (cr=240892 pr=227649 pw=0 time=16170607 us)
    21895 VIEW PLATE (cr=316 pr=0 pw=0 time=43825 us)
    21895 FILTER (cr=316 pr=0 pw=0 time=43823 us)
    21895 TABLE ACCESS FULL PLATE (cr=316 pr=0 pw=0 time=31 us)
    0 INDEX UNIQUE SCAN PK_OPERATOR_GROUP (cr=0 pr=0 pw=0 time=0 us)(object id 45769)
    21311 HASH JOIN (cr=240576 pr=227649 pw=0 time=16106174 us)
    21311 HASH JOIN (cr=133559 pr=121596 pw=0 time=9594130 us)
    21311 HASH JOIN (cr=94323 pr=83281 pw=0 time=6917067 us)
    21311 HASH JOIN (cr=86383 pr=75547 pw=0 time=5509672 us)
    7776 HASH JOIN (cr=8134 pr=0 pw=0 time=285364 us)
    7776 TABLE ACCESS BY INDEX ROWID SAMPLE (cr=572 pr=0 pw=0 time=27152 us)
    7876 NESTED LOOPS (cr=377 pr=0 pw=0 time=488287 us)
    99 HASH JOIN (cr=160 pr=0 pw=0 time=4168 us)
    99 TABLE ACCESS FULL SDG_USER (cr=53 pr=0 pw=0 time=1209 us)
    5719 TABLE ACCESS FULL SDG (cr=107 pr=0 pw=0 time=17 us)
    7776 INDEX RANGE SCAN FK_SAMPLE_SDG (cr=217 pr=0 pw=0 time=623 us)(object id 45990)
    1079741 TABLE ACCESS FULL SAMPLE_USER (cr=7562 pr=0 pw=0 time=24 us)
    3307948 TABLE ACCESS FULL ALIQUOT (cr=78249 pr=75547 pw=0 time=3331129 us)
    3406836 TABLE ACCESS FULL ALIQUOT_USER (cr=7940 pr=7734 pw=0 time=556 us)
    3406832 TABLE ACCESS FULL TEST (cr=39236 pr=38315 pw=0 time=3413192 us)
    3406832 TABLE ACCESS FULL RESULT (cr=107017 pr=106053 pw=0 time=6848487 us)
    0 INDEX UNIQUE SCAN PK_OPERATOR_GROUP (cr=0 pr=0 pw=0 time=0 us)(object id 45769)
    0 INDEX UNIQUE SCAN PK_OPERATOR_GROUP (cr=0 pr=0 pw=0 time=0 us)(object id 45769)
    0 INDEX UNIQUE SCAN PK_OPERATOR_GROUP (cr=0 pr=0 pw=0 time=0 us)(object id 45769)
    0 INDEX UNIQUE SCAN PK_OPERATOR_GROUP (cr=0 pr=0 pw=0 time=0 us)(object id 45769)
    select 'x'
    from
    dual
    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 0 0 0 1
    total 3 0.00 0.00 0 0 0 1
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 97
    Rows Row Source Operation
    1 FAST DUAL (cr=0 pr=0 pw=0 time=3 us)
    begin :id := sys.dbms_transaction.local_transaction_id; end;
    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 1
    Fetch 0 0.00 0.00 0 0 0 0
    total 2 0.00 0.00 0 0 0 1
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 97
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call count cpu elapsed disk query current rows
    Parse 3 0.00 0.00 0 0 0 0
    Execute 3 1.15 1.16 0 0 0 1
    Fetch 2 8.53 16.10 227649 241266 0 501
    total 8 9.68 17.27 227649 241266 0 502
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
    call count cpu elapsed disk query current rows
    Parse 30 0.00 0.00 0 0 0 0
    Execute 30 0.00 0.00 0 0 0 0
    Fetch 30 0.00 0.00 0 40 0 10
    total 90 0.00 0.00 0 40 0 10
    Misses in library cache during parse: 0
    3 user SQL statements in session.
    30 internal SQL statements in session.
    33 SQL statements in session.
    Trace file: C:\oracle\product\10.2.0\admin\nautp02\udump\nautp02_ora_880.trc
    Trace file compatibility: 10.01.00
    Sort options: default
    8 sessions in tracefile.
    3 user SQL statements in trace file.
    30 internal SQL statements in trace file.
    33 SQL statements in trace file.
    6 unique SQL statements in trace file.
    633 lines in trace file.
    23 elapsed seconds in trace file.
    {code}

    explain 2
    SQL Statement which produced this data:
      select * from table(dbms_xplan.display)
    PLAN_TABLE_OUTPUT
    | Id  | Operation                               | Name                     | Rows  | Bytes | Cost (%CPU)|
    |   0 | SELECT STATEMENT                        |                          |    71 | 24779 |   857   (1)|
    |   1 |  SORT ORDER BY                          |                          |    71 | 24779 |   857   (1)|
    |*  2 |   FILTER                                |                          |       |       |            |
    |*  3 |    TABLE ACCESS BY INDEX ROWID          | RESULT                   |     1 |    20 |     4   (0)|
    |   4 |     NESTED LOOPS                        |                          |    72 | 25128 |   856   (1)|
    |   5 |      NESTED LOOPS                       |                          |    70 | 23030 |   576   (1)|
    |*  6 |       HASH JOIN OUTER                   |                          |    69 | 20493 |   369   (1)|
    |   7 |        NESTED LOOPS                     |                          |    69 | 11247 |   285   (0)|
    |   8 |         NESTED LOOPS                    |                          |    69 | 10626 |   147   (0)|
    |   9 |          NESTED LOOPS                   |                          |    23 |  2438 |    78   (0)|
    |  10 |           NESTED LOOPS                  |                          |    23 |  2070 |    32   (0)|
    |  11 |            NESTED LOOPS                 |                          |     1 |    67 |    15   (0)|
    |  12 |             NESTED LOOPS                |                          |     1 |    45 |    14   (0)|
    |* 13 |              TABLE ACCESS FULL          | SDG_USER                 |     1 |    24 |    13   (0)|
    |  14 |              TABLE ACCESS BY INDEX ROWID| DWH_ABS_DETERMINATION    |     1 |    21 |     1   (0)|
    |* 15 |               INDEX UNIQUE SCAN         | PK_DWH_ABS_DETERMINATION |     1 |       |     0   (0)|
    |  16 |             TABLE ACCESS BY INDEX ROWID | SDG                      |     1 |    22 |     1   (0)|
    |* 17 |              INDEX UNIQUE SCAN          | PK_SDG                   |     1 |       |     0   (0)|
    |  18 |            TABLE ACCESS BY INDEX ROWID  | SAMPLE                   |   190 |  4370 |    17   (0)|
    |* 19 |             INDEX RANGE SCAN            | FK_SAMPLE_SDG            |   597 |       |     2   (0)|
    |  20 |           TABLE ACCESS BY INDEX ROWID   | SAMPLE_USER              |     1 |    16 |     2   (0)|
    |* 21 |            INDEX UNIQUE SCAN            | PK_SAMPLE_USER           |     1 |       |     1   (0)|
    |* 22 |          TABLE ACCESS BY INDEX ROWID    | ALIQUOT                  |     3 |   144 |     3   (0)|
    |* 23 |           INDEX RANGE SCAN              | FK_ALIQUOT_SAMPLE        |     3 |       |     2   (0)|
    |  24 |         TABLE ACCESS BY INDEX ROWID     | ALIQUOT_USER             |     1 |     9 |     2   (0)|
    |* 25 |          INDEX UNIQUE SCAN              | PK_ALIQUOT_USER          |     1 |       |     1   (0)|
    |  26 |        VIEW                             | PLATE                    | 21787 |  2851K|    84   (2)|
    |* 27 |         FILTER                          |                          |       |       |            |
    |  28 |          TABLE ACCESS FULL              | PLATE                    | 21787 |   574K|    84   (2)|
    |* 29 |          INDEX UNIQUE SCAN              | PK_OPERATOR_GROUP        |     1 |     7 |     0   (0)|
    |  30 |       TABLE ACCESS BY INDEX ROWID       | TEST                     |     1 |    32 |     3   (0)|
    |* 31 |        INDEX RANGE SCAN                 | FK_TEST_ALIQUOT          |     1 |       |     2   (0)|
    |* 32 |      INDEX RANGE SCAN                   | FK_RESULT_TEST           |     2 |       |     2   (0)|
    |* 33 |    INDEX UNIQUE SCAN                    | PK_OPERATOR_GROUP        |     1 |     7 |     0   (0)|
    |* 34 |    INDEX UNIQUE SCAN                    | PK_OPERATOR_GROUP        |     1 |     7 |     0   (0)|
    |* 35 |    INDEX UNIQUE SCAN                    | PK_OPERATOR_GROUP        |     1 |     7 |     0   (0)|
    |* 36 |    INDEX UNIQUE SCAN                    | PK_OPERATOR_GROUP        |     1 |     7 |     0   (0)|
    Predicate Information (identified by operation id):
       2 - filter(("GROUP_ID" IS NULL OR  EXISTS (SELECT /*+ */ 0 FROM "LIMS"."OPERATOR_GROUP"
                  "OPERATOR_GROUP" WHERE "OPERATOR_ID"="LIMS$OPERATOR_ID"() AND "GROUP_ID"=:B1)) AND ("GROUP_ID"
                  IS NULL OR  EXISTS (SELECT /*+ */ 0 FROM "LIMS"."OPERATOR_GROUP" "OPERATOR_GROUP" WHERE
                  "OPERATOR_ID"="LIMS$OPERATOR_ID"() AND "GROUP_ID"=:B2)) AND ("GROUP_ID" IS NULL OR  EXISTS
                  (SELECT /*+ */ 0 FROM "LIMS"."OPERATOR_GROUP" "OPERATOR_GROUP" WHERE
                  "OPERATOR_ID"="LIMS$OPERATOR_ID"() AND "GROUP_ID"=:B3)) AND ("GROUP_ID" IS NULL OR  EXISTS
                  (SELECT /*+ */ 0 FROM "LIMS"."OPERATOR_GROUP" "OPERATOR_GROUP" WHERE
                  "OPERATOR_ID"="LIMS$OPERATOR_ID"() AND "GROUP_ID"=:B4)))
       3 - filter("NAME"='End result')
       6 - access("PLT"."PLATE_ID"(+)="PLATE_ID")
      13 - filter("U_ABS_DETERMINATION" IS NOT NULL AND "U_CLIENT_TYPE"='QC' AND
                  "U_WEEK_OF_PROCESSING"=TO_NUMBER(:WEEK) AND "U_YEAR_OF_SAMPLE_DELIVERY"=TO_NUMBER(:YEAR) AND
                  DECODE(:CROPCODE,(-1),'-1',"U_CROP_GROUP")=DECODE(:CROPCODE,(-1),'-1',:CROPCODE))
      15 - access("U_ABS_DETERMINATION"="DETERMINATION_ASSIGNMENT")
      17 - access("SDG_ID"="SDG_ID")
      19 - access("SDG_ID"="SDG_ID")
      21 - access("SAMPLE_ID"="SAMPLE_ID")
      22 - filter("STATUS"='C' OR "STATUS"='P' OR "STATUS"='V')
      23 - access("SAMPLE_ID"="SAMPLE_ID")
      25 - access("ALIQUOT_ID"="ALIQUOT_ID")
      27 - filter("GROUP_ID" IS NULL OR  EXISTS (SELECT /*+ */ 0 FROM "LIMS"."OPERATOR_GROUP"
                  "OPERATOR_GROUP" WHERE "OPERATOR_ID"="LIMS$OPERATOR_ID"() AND "GROUP_ID"=:B1))
      29 - access("GROUP_ID"=:B1 AND "OPERATOR_ID"="LIMS$OPERATOR_ID"())
      31 - access("ALIQUOT_ID"="ALIQUOT_ID")
      32 - access("TEST_ID"="TEST_ID")
      33 - access("GROUP_ID"=:B1 AND "OPERATOR_ID"="LIMS$OPERATOR_ID"())
      34 - access("GROUP_ID"=:B1 AND "OPERATOR_ID"="LIMS$OPERATOR_ID"())
      35 - access("GROUP_ID"=:B1 AND "OPERATOR_ID"="LIMS$OPERATOR_ID"())
      36 - access("GROUP_ID"=:B1 AND "OPERATOR_ID"="LIMS$OPERATOR_ID"())
    Note
       - 'PLAN_TABLE' is old version
    tkprof 2
    TKPROF: Release 10.2.0.3.0 - Production on Tue Jan 13 13:28:26 2009
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Trace file: C:\oracle\product\10.2.0\admin\nautp02\udump\nautp02_ora_5456.trc
    Sort options: default
    count    = number of times OCI procedure was executed
    cpu      = cpu time in seconds executing
    elapsed  = elapsed time in seconds executing
    disk     = number of physical reads of buffers from disk
    query    = number of buffers gotten for consistent read
    current  = number of buffers gotten in current mode (usually for update)
    rows     = number of rows processed by the fetch or execute call
    SELECT sdu.u_crop_group,
           sd.name as sdg_name,
           ad.variety_name,
           ad.batch_number,
           a.name as aliquot_name,
           sau.u_box_code as box_code,
           sau.u_box_position as box_position,
           t.name as test_name,
           r.original_result,
           plt.name as plate_name,
           concat(chr(a.plate_row + 64),a.plate_column) as plate_position,
           au.u_replicate_number as replicate_number
    FROM lims_sys.sdg sd,
         lims_sys.sdg_user sdu,
         lims_sys.sample sa,
         lims_sys.sample_user sau,
         lims_sys.aliquot a,
         lims_sys.aliquot_user au,
         lims_sys.test t,
         lims_sys.result r,
         lims_sys.plate plt,
         lims_sys.abs_determination ad
    WHERE sd.sdg_id = sdu.sdg_id
      AND sd.sdg_id = sa.sdg_id
      AND sa.sample_id = sau.sample_id
      AND sau.sample_id = a.sample_id
      AND a.aliquot_id = au.aliquot_id
      AND au.aliquot_id = t.aliquot_id
      AND t.test_id = r.test_id
      AND plt.plate_id (+) = a.plate_id
      AND sdu.u_abs_determination = ad.determination_assignment
      AND a.status IN ('V','P','C')
      AND r.name = 'End result'
      AND sdu.u_client_type = 'QC'
      AND sdu.u_year_of_sample_delivery = (:year)
      AND sdu.u_week_of_processing = (:week)
      AND decode(:cropcode,-1,'-1',sdu.u_crop_group) = decode(:cropcode,-1,'-1',:cropcode)
    ORDER BY box_code, box_position, replicate_number
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.01       0.00          0          0          0           0
    Execute      1      0.45       0.87          0          0          0           0
    Fetch        1      1.00       0.99          0     221420          0         500
    total        3      1.46       1.86          0     221420          0         500
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 97 
    Rows     Row Source Operation
        500  SORT ORDER BY (cr=221420 pr=0 pw=0 time=992364 us)
      21311   FILTER  (cr=221420 pr=0 pw=0 time=1128970 us)
      21311    TABLE ACCESS BY INDEX ROWID RESULT (cr=221420 pr=0 pw=0 time=1086345 us)
      42623     NESTED LOOPS  (cr=217549 pr=0 pw=0 time=30006317 us)
      21311      NESTED LOOPS  (cr=174880 pr=0 pw=0 time=809278 us)
      21311       NESTED LOOPS  (cr=110117 pr=0 pw=0 time=553538 us)
      21311        HASH JOIN OUTER (cr=46182 pr=0 pw=0 time=319102 us)
      21311         TABLE ACCESS BY INDEX ROWID ALIQUOT (cr=45866 pr=0 pw=0 time=193037 us)
      29088          NESTED LOOPS  (cr=39885 pr=0 pw=0 time=320084 us)
       7776           NESTED LOOPS  (cr=24267 pr=0 pw=0 time=156721 us)
       7776            NESTED LOOPS  (cr=937 pr=0 pw=0 time=78954 us)
         99             NESTED LOOPS  (cr=454 pr=0 pw=0 time=3826 us)
         99              NESTED LOOPS  (cr=253 pr=0 pw=0 time=2833 us)
         99               TABLE ACCESS FULL SDG_USER (cr=53 pr=0 pw=0 time=1531 us)
         99               TABLE ACCESS BY INDEX ROWID DWH_ABS_DETERMINATION (cr=200 pr=0 pw=0 time=956 us)
         99                INDEX UNIQUE SCAN PK_DWH_ABS_DETERMINATION (cr=101 pr=0 pw=0 time=438 us)(object id 46965)
         99              TABLE ACCESS BY INDEX ROWID SDG (cr=201 pr=0 pw=0 time=707 us)
         99               INDEX UNIQUE SCAN PK_SDG (cr=101 pr=0 pw=0 time=330 us)(object id 46071)
       7776             TABLE ACCESS BY INDEX ROWID SAMPLE (cr=483 pr=0 pw=0 time=16261 us)
       7776              INDEX RANGE SCAN FK_SAMPLE_SDG (cr=217 pr=0 pw=0 time=562 us)(object id 45990)
       7776            TABLE ACCESS BY INDEX ROWID SAMPLE_USER (cr=23330 pr=0 pw=0 time=64710 us)
       7776             INDEX UNIQUE SCAN PK_SAMPLE_USER (cr=15554 pr=0 pw=0 time=33728 us)(object id 46012)
      21311           INDEX RANGE SCAN FK_ALIQUOT_SAMPLE (cr=15618 pr=0 pw=0 time=43423 us)(object id 45346)
      21895         VIEW  PLATE (cr=316 pr=0 pw=0 time=43833 us)
      21895          FILTER  (cr=316 pr=0 pw=0 time=21936 us)
      21895           TABLE ACCESS FULL PLATE (cr=316 pr=0 pw=0 time=37 us)
          0           INDEX UNIQUE SCAN PK_OPERATOR_GROUP (cr=0 pr=0 pw=0 time=0 us)(object id 45769)
      21311        TABLE ACCESS BY INDEX ROWID ALIQUOT_USER (cr=63935 pr=0 pw=0 time=182479 us)
      21311         INDEX UNIQUE SCAN PK_ALIQUOT_USER (cr=42624 pr=0 pw=0 time=99160 us)(object id 45386)
      21311       TABLE ACCESS BY INDEX ROWID TEST (cr=64763 pr=0 pw=0 time=219096 us)
      21311        INDEX RANGE SCAN FK_TEST_ALIQUOT (cr=42669 pr=0 pw=0 time=129354 us)(object id 46222)
      21311      INDEX RANGE SCAN FK_RESULT_TEST (cr=42669 pr=0 pw=0 time=125893 us)(object id 45940)
          0    INDEX UNIQUE SCAN PK_OPERATOR_GROUP (cr=0 pr=0 pw=0 time=0 us)(object id 45769)
          0    INDEX UNIQUE SCAN PK_OPERATOR_GROUP (cr=0 pr=0 pw=0 time=0 us)(object id 45769)
          0    INDEX UNIQUE SCAN PK_OPERATOR_GROUP (cr=0 pr=0 pw=0 time=0 us)(object id 45769)
          0    INDEX UNIQUE SCAN PK_OPERATOR_GROUP (cr=0 pr=0 pw=0 time=0 us)(object id 45769)
    select 'x'
    from
    dual
    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          0          0          0           1
    total        3      0.00       0.00          0          0          0           1
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 97 
    Rows     Row Source Operation
          1  FAST DUAL  (cr=0 pr=0 pw=0 time=6 us)
    begin :id := sys.dbms_transaction.local_transaction_id; end;
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          2           0
    Execute      1      0.00       0.00          0          0          0           1
    Fetch        0      0.00       0.00          0          0          0           0
    total        2      0.00       0.00          0          0          2           1
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 97 
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        3      0.01       0.00          0          0          2           0
    Execute      3      0.45       0.87          0          0          0           1
    Fetch        2      1.00       0.99          0     221420          0         501
    total        8      1.46       1.87          0     221420          2         502
    Misses in library cache during parse: 2
    Misses in library cache during execute: 2
    OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse       43      0.01       0.00          0          0         12           0
    Execute    128      0.00       0.01          0          0          0           0
    Fetch      178      0.00       0.00          0        383          0         465
    total      349      0.01       0.02          0        383         12         465
    Misses in library cache during parse: 5
    Misses in library cache during execute: 5
        3  user  SQL statements in session.
      128  internal SQL statements in session.
      131  SQL statements in session.
    Trace file: C:\oracle\product\10.2.0\admin\nautp02\udump\nautp02_ora_5456.trc
    Trace file compatibility: 10.01.00
    Sort options: default
           1  session in tracefile.
           3  user  SQL statements in trace file.
         128  internal SQL statements in trace file.
         131  SQL statements in trace file.
          19  unique SQL statements in trace file.
        1352  lines in trace file.
         287  elapsed seconds in trace file.

  • How to change the primary node for a resource group. Solaris cluster. 3.2

    I have searched for hours to try to find this answer.
    I want to change the primary node of a resource group.
    example.
    log-rg runs on node1.this.com it will list node1.this.com first when you do clrg status.
    But we run it on node2.this.com
    A reboot will have log-rg run on node1 after a reboot. We have to switch it by hand to run
    on node2 .
    I want it to know that it should always try to first run on node1, but still failover to node2 if the situation arises.
    scswitch -z -g log-rg -h node2 (and all the fully qualified versions of this command)
    would not work.
    How tow can I change the primary node for log-rg (logZ) from node1 to node2???
    thanks!

    Hi.
    Show current configuration for RG:
    clrg show -v log-rg
    For change order Nodelist you can:
    clrg remove-node -n node1 log-rg
    clrg add-node -n node1 log-rg
    But tis command more destructive. It may be problem add-node back to this RG.
    I don't know why Validation of resource log-tiv in res group log-rg on node1 failed.
    Need more know about configuration, resourse type, etc.
    May be it's better create for test small RG and try move and change resource.
    Nodelist - say candidates for run this resources. But at this moment RG can run on any from this list.
    Docs about Sun Cluster.
    http://download.oracle.com/docs/cd/E19787-01/820-7360/fxjbo/index.html
    Typical tasks:
    http://download.oracle.com/docs/cd/E19787-01/820-7359/z40002701009474/index.html
    Adding or Removing a Node to or From a Resource Group
    http://download.oracle.com/docs/cd/E19787-01/820-7359/z400043a1055200/index.html

  • How to Change the Alias name for Internet user in SU01 tr code through cod?

    Hi Guys,
                 My req is we have to change the Alias name(SU01 tr code) for the existing users thru code.So can anybody tell me how to change the Alias name like which we do it in SU01 tr code thru code or FM.?
                Is there any FM for tha changing Alias Name?
    Thanks,
    Gopi.

    Hello Gopi Anne ,
                                 You can use the following FM / BAPI :
    BAPI_USER_CHANGE
    MY_BAPI_USER_CHANGE
    For BAPI_USER_CHANGE :
    You need to make use of the IMPORT parameter :
    ALIAS     TYPE     BAPIALIAS                               User Name Alias
    ALIASX     LIKE     BAPIALIASX                               User alias change flag
    Thanks,
    Greetson

  • How you change the download frequency for a single Podcast?

    I have iTunes 11.1.5 for Mac, and I can't find how to change the down load frequence , aka "check for new episodes" setting for individual podcasts. I've tried using the settings menu in the "My Podcasts" and the "List" podcast view. When I do this, I see these setting:
    Keep
    Download
    Sort Order
    Play Order
    If I click on the "Defaults..." button, the top setting is "check for new episodes"
    I have no problem with being able to change the  default download frequency setting, but I am at wit's end with locating where I can change that setting for individual podcasts.

    Bump.

Maybe you are looking for

  • Converting to CMYK?

    I made a brochure in Pages that I'm having printed. I saved the file as a PDF to send to the printer, and unfortunately he tells me that it's in RGB, so the blacks will look quite bad once printed. So the question is, how do I convert this to CMYK, t

  • What does the sync mail checkbox do in iTunes?

    Can anyone help me understand what checking the "sync mail" feature does when synching my iPhone with iTunes? I'm not sure that it does anything since my mail.app and my iphone are both checking the pop 3 server.

  • MB5B showing diff data for diff users

    Dear All, At my client side in standard report MB5B for one user data for particular material is coming while for another user it is showing no data. I have checked authorization object in SU53 but it is having no problem. Roles,parameters and profil

  • Elements 7 -Raw images

    Hi,     after 2 years with no problems, my Elements 7 is not raeding Raw images from my memory cards-Any ideas please how I can correct this? Thank you John.

  • Key in trigger

    Dear All, if i enter one text in one field at that time same text will display another fielf in forms 10g . how to do that for example field A i enter a at the same time i can see field B it show a regards, Apple