Query is running very slow when consulting history data in EBS

SELECT *
  FROM (select NVL(TO_CHAR(aps.vendor_id), 'SIN PROVEEDOR') CODIGO,
               NVL(aps.vendor_name, 'SIN PROVEEDOR') PROVEEDOR,
               null IMPORTE_TRANSACCIONAL,
               SUM(nvl(CTL.GROSS_EXTENDED_AMOUNT, CTL.EXTENDED_AMOUNT) *
                   NVL(Cta.EXCHANGE_RATE, 1)) IMPORTE_FUNCIONAL
          from ra_customer_trx_all cta,
               ra_cust_trx_types_all ctt,
               ra_customer_trx_lines_all ctl,
               mtl_system_items_b inv,
               hz_cust_accounts ca,
               hz_parties p,
               AR_CUSTOMERS ac,
               hz_cust_acct_sites_all hcca,
               hz_cust_site_uses_all hcsua,
               RA_TERRITORIES rt,
               Jtf_Rs_Salesreps vend,
               gl_code_combinations glc,
               ap_suppliers aps,
               (select paa.item_id, paa.vendor_id
                  from PO_ASL_ATTRIBUTES paa, PO_APPROVED_SUPPLIER_LIST PASL
                 where Paa.Asl_Id = PASL.Asl_Id(+)
                   and pasl.disable_flag is null) paa2
         where CTA.cust_trx_type_id = ctt.cust_trx_type_id
           and ctl.customer_trx_id = cta.customer_trx_id
           and ctl.Inventory_Item_Id = inv.inventory_item_id(+)
           and ctt.gl_id_rec = glc.code_combination_id
           and ca.cust_account_id = cta.bill_to_customer_id
           and p.party_id = ca.party_id
           and ac.CUSTOMER_ID = cta.bill_to_customer_id
           and hcca.cust_account_id = ca.cust_account_id
           and hcca.org_id = '82'
           and hcsua.site_use_id = cta.bill_to_site_use_id
           and hcsua.cust_acct_site_id = hcca.cust_acct_site_id
           and hcsua.org_id = '82'
           and rt.territory_id(+) = hcca.territory_id
           and cta.primary_salesrep_id = vend.salesrep_id(+)
           and inv.organization_id = '84'
           and paa2.vendor_id = aps.vendor_id(+)
           and ctl.inventory_item_id = paa2.item_id(+)
           AND CTT.TYPE IN ('INV', 'CM')
           and ca.cust_account_id(+) = cta.bill_to_customer_id
           and p.party_id(+) = ca.party_id
           and ctl.Line_Type = 'LINE'
           and cta.complete_flag = 'Y'
           and cta.status_trx not in ('VD')
           and cta.legal_entity_id = '23274'
           and cta.trx_date between to_Date('01/10/2014', 'dd/MM/yyyy') AND
               to_Date('13/10/2014', 'dd/MM/yyyy')
         group by aps.vendor_id, aps.vendor_name
        UNION
        select 'SIN ITEM' CODIGO,
               'SIN ITEM' PROVEEDOR,
               null IMPORTE_TRANSACCIONAL,
               SUM(nvl(CTL.GROSS_EXTENDED_AMOUNT, CTL.EXTENDED_AMOUNT) *
                   NVL(Cta.EXCHANGE_RATE, 1)) IMPORTE_FUNCIONAL
          from ra_customer_trx_all       cta,
               ra_cust_trx_types_all     ctt,
               ra_customer_trx_lines_all ctl,
               hz_cust_accounts          ca,
               hz_parties                p,
               AR_CUSTOMERS              ac,
               hz_cust_acct_sites_all    hcca,
               hz_cust_site_uses_all     hcsua,
               RA_TERRITORIES            rt,
               Jtf_Rs_Salesreps          vend,
               gl_code_combinations      glc
         where CTA.cust_trx_type_id = ctt.cust_trx_type_id
           and ctl.customer_trx_id = cta.customer_trx_id
           and ctl.Inventory_Item_Id is null
           and ctt.gl_id_rec = glc.code_combination_id
           and ca.cust_account_id = cta.bill_to_customer_id
           and p.party_id = ca.party_id
           and ac.CUSTOMER_ID = cta.bill_to_customer_id
           and hcca.cust_account_id = ca.cust_account_id
           and hcca.org_id = '82'
           and hcsua.site_use_id = cta.bill_to_site_use_id
           and hcsua.cust_acct_site_id = hcca.cust_acct_site_id
           and hcsua.org_id = '82'
           and rt.territory_id(+) = hcca.territory_id
           and cta.primary_salesrep_id = vend.salesrep_id(+)
           AND CTT.TYPE IN ('INV', 'CM')
           and ca.cust_account_id(+) = cta.bill_to_customer_id
           and p.party_id(+) = ca.party_id
           and ctl.Line_Type = 'LINE'
           and cta.complete_flag = 'Y'
           and cta.status_trx not in ('VD')
           and cta.legal_entity_id = '23274'
           and cta.trx_date between to_Date('01/10/2014', 'dd/MM/yyyy') AND
               to_Date('13/10/2014', 'dd/MM/yyyy')
         group by 'SIN ITEM', 'SIN ITEM') T_GRUPO
order by DECODE(T_GRUPO.PROVEEDOR,
                 'SIN ITEM',
                 'A',
                 'SIN PROVEEDOR',
                 'A',
                 T_GRUPO.PROVEEDOR)

Hi Hussein,
APP 12.1.3
Database 11.2.0.3.0
SO linux x86-64
stadistics: 0ne month ago 
this  slowness is from three months ago
Execution Plan
| Id  | Operation                                                  | Name                                  | Rows  | Bytes | Cost (%CPU)|
|   0 | SELECT STATEMENT                                 |                                          |      2 |   318 | 12680   (1)|
|   1 |  SORT ORDER BY                                      |                                          |      2 |   318 | 12680   (1)|
|   2 |   VIEW                                                        |                                          |      2 |   318 | 12679   (1)|
|   3 |    SORT UNIQUE                                          |                                         |      2 |   697 | 12679  (51)|                                      
|   4 |     UNION-ALL                                              |                                          |        |            |               |                                
|   5 |      HASH GROUP BY                                   |                                           |      1 |   377 |  6338   (1)|                                      
|   6 |       NESTED LOOPS OUTER                        |                                            |      1 |   377 |  6336   (1)|                                      
|   7 |        NESTED LOOPS OUTER                       |                                           |      1 |   343 |  6336   (1)|                                      
|   8 |         NESTED LOOPS                                 |                                              |      1 |   328 |  6335   (1)|                                      
|   9 |          NESTED LOOPS                                |                                              |      1 |   323 |  6335   (1)|                                      
|  10 |           NESTED LOOPS OUTER                 |                                                 |      1 |   311 |  6333   (1)|                                      
|  11 |            NESTED LOOPS                           |                                                    |      1 |   304 |  6332   (1)|                                      
|  12 |             NESTED LOOPS                          |                                                  |      1 |   296 |  6332   (1)|                                      
|  13 |              NESTED LOOPS                        |                                                   |      1 |   275 |  6329   (1)|                                      
|* 14 |               HASH JOIN                               |                                                   |      1 |   192 |  6328   (1)|                                      
|* 15 |                HASH JOIN                    |                                                              |  6493 |   450K|  5778   (1)|                                       
|* 16 |                 HASH JOIN                   | |                                                              6493 |   367K|  5432   (1)|                                       
|* 17 |        TABLE ACCESS BY INDEX ROWID | RA_CUSTOMER_TRX_ALL                  |  6556 |   288K|  4635   (1)|                                       
|* 18 |                   INDEX RANGE SCAN          | RA_CUSTOMER_TRX_N5                     | 26223 |        |    97   (2)|                                      
|* 19 |                  TABLE ACCESS FULL          | HZ_CUST_SITE_USES_ALL                  | 40227 |   510K|   797   (3)|                                       
|* 20 |                 TABLE ACCESS FULL           | HZ_CUST_ACCT_SITES_ALL                  | 20020 |   254K|   345   (3)|                                       
|  21 |                TABLE ACCESS FULL            | HZ_CUST_ACCOUNTS                             | 40020 |  4728K|   549   (3)|                                       
|* 22 |               INDEX UNIQUE SCAN             | HZ_PARTIES_U1                                       |      1|                  |     0   (0)|                                       
|* 23 |       TABLE ACCESS BY INDEX ROWID    | RA_CUSTOMER_TRX_LINES_ALL           |     1 |    21      |     3   (0)|                                       
|* 24 |               INDEX RANGE SCAN              | RA_CUSTOMER_TRX_LINES_N2                |      4 |            |     2   (0)|                                      
|* 25 |             INDEX UNIQUE SCAN               | MTL_SYSTEM_ITEMS_B_U1                      |      1 |     8      |     0   (0)|                                      
|* 26 |            INDEX RANGE SCAN                 | JTF_RS_SALESREPS_U1                           |      1 |     7      |     1   (0)|                                      
|* 27 |           TABLE ACCESS BY INDEX ROWID       | RA_CUST_TRX_TYPES_ALL              |      1 |    12      |     2   (0)|                                      
|* 28 |            INDEX RANGE SCAN                 | RA_CUST_TRX_TYPES_U1                           |      1 |            |     1   (0)                                       
|* 29 |          INDEX UNIQUE SCAN                  | GL_CODE_COMBINATIONS_U1                     |      1 |     5      |     0   (0)|                                      
|  30 |         VIEW PUSHED PREDICATE               |                                                                |      1 |    15      |     1   (0)|                                      
|* 31 |          FILTER                             |                                                                                 |        |       |            |                                      
|  32 |           NESTED LOOPS OUTER                  |                                                                 |      1 |    54      |     1   (0)|                                      
|  33 |            TABLE ACCESS BY INDEX ROWID      | PO_ASL_ATTRIBUTES                          |      1 |    39      |     1   (0)|                                      
|* 34 |             INDEX SKIP SCAN                              | PO_ASL_ATTRIBUTES_N1                    |      1 |               |     1   (0)|                                      
|  35 |            TABLE ACCESS BY INDEX ROWID    | PO_APPROVED_SUPPLIER_LIST           |     1      |    15     |     0   (0)|                                       
|* 36 |             INDEX UNIQUE SCAN                      | PO_APPROVED_SUPPLIER_LIST_U1        |     1      |              |     0   (0)|                                       
|  37 |        TABLE ACCESS BY INDEX ROWID        | AP_SUPPLIERS                                       |      1      |    34       |     0   (0)|                                      
|* 38 |         INDEX UNIQUE SCAN                         | AP_SUPPLIERS_U1                                    |      1      |              |     0   (0)|                                      
|  39 |      SORT GROUP BY NOSORT                   |                                                               |      1 |   320           |  6341   (1)|                                      
|  40 |       NESTED LOOPS                          |                                                                       |        |                      |            |                                      
|  41 |        NESTED LOOPS                         |                                                                        |      1 |   320           |  6340   (1)|                                      
|  42 |         NESTED LOOPS                        |                                                                       |      1 |        299      |  6337   (1)|                                     
|  43 |          NESTED LOOPS OUTER                 |                                                                  |      1 |   216           |  6336   (1)|                                      
|* 44 |           HASH JOIN                         |                                                                              |      1 |   209      |  6335   (1)|                                      
|* 45 |            TABLE ACCESS FULL                | HZ_CUST_ACCT_SITES_ALL                        | 20020  |   254K      |   345   (3)|                                      
|* 46 |            HASH JOIN                        |                                                                           |  5819      |  1113K     |  5989   (1)|                                      
|* 47 |             HASH JOIN                       |                                                                            |  5875      |   430K     |      5439   (1)|                                      
|* 48 |              HASH JOIN                      |                                                                            |  5931      |   359K     |  4641   (1)|                                      
|  49 |               NESTED LOOPS                  |                                                                       |     38      |   646      |     6   (0)|                                     
|* 50 |                TABLE ACCESS FULL            | RA_CUST_TRX_TYPES_ALL                        |          38 |   456      |     6   (0)|                                     
|* 51 |                INDEX UNIQUE SCAN            | GL_CODE_COMBINATIONS_U1                       |      1      |     5      |     0   (0)|                                     
|* 52 |       TABLE ACCESS BY INDEX ROWID   | RA_CUSTOMER_TRX_ALL                              |  6556 |   288K |  4635   (1)|                                     
|* 53 |                INDEX RANGE SCAN             | RA_CUSTOMER_TRX_N5                               | 26223    |        |    97   (2)|                                     
|* 54 |              TABLE ACCESS FULL              | HZ_CUST_SITE_USES_ALL                         | 40227 |   510K |   797   (3)|                                     
|  55 |             TABLE ACCESS FULL               | HZ_CUST_ACCOUNTS                                 | 40020 |  4728K |   549   (3)|                                     
|* 56 |           INDEX RANGE SCAN                  | JTF_RS_SALESREPS_U1                             |      1      |     7      |     1   (0)|                                     
|* 57 |          INDEX UNIQUE SCAN                  | HZ_PARTIES_U1                                             |       1      |       |     0   (0)|                                     
|* 58 |         INDEX RANGE SCAN                    | RA_CUSTOMER_TRX_LINES_N2                     |      4      |         |     2   (0)|                                     
|* 59 |        TABLE ACCESS BY INDEX ROWID          | RA_CUSTOMER_TRX_LINES_ALL           |     1       |    21     |     3   (0)|                                    
Predicate Information (identified by operation id):
  14 - access("CUST"."CUST_ACCOUNT_ID"="CTA"."BILL_TO_CUSTOMER_ID" AND
              "HCCA"."CUST_ACCOUNT_ID"="CUST_ACCOUNT_ID")
  15 - access("HCSUA"."CUST_ACCT_SITE_ID"="HCCA"."CUST_ACCT_SITE_ID")
  16 - access("HCSUA"."SITE_USE_ID"="CTA"."BILL_TO_SITE_USE_ID")
  17 - filter("CTA"."COMPLETE_FLAG"='Y' AND "CTA"."STATUS_TRX"<>'VD' AND "CTA"."                                                                            LEGAL_ENTITY_ID"=23274)
  18 - access("CTA"."TRX_DATE">=TO_DATE(' 2014-01-01 00:00:00', 'syyyy-mm-dd hh2                                                                             
4:mi:ss') AND
              "CTA"."TRX_DATE"<=TO_DATE(' 2014-10-13 00:00:00', 'syyyy-mm-dd hh2                                                                             
4:mi:ss'))
  19 - filter("HCSUA"."ORG_ID"=82)
  20 - filter("HCCA"."ORG_ID"=82)
  22 - access("PARTY_ID"="PARTY_ID")
  23 - filter("CTL"."INVENTORY_ITEM_ID" IS NOT NULL AND "CTL"."LINE_TYPE"='LINE'                                                                             
  24 - access("CTL"."CUSTOMER_TRX_ID"="CTA"."CUSTOMER_TRX_ID")
  25 - access("CTL"."INVENTORY_ITEM_ID"="INV"."INVENTORY_ITEM_ID" AND "INV"."ORG                                                                             
ANIZATION_ID"=84)
  26 - access("CTA"."PRIMARY_SALESREP_ID"="VEND"."SALESREP_ID"(+))
  27 - filter("CTT"."GL_ID_REC" IS NOT NULL AND ("CTT"."TYPE"='CM' OR "CTT"."TYP                                                                             
E"='INV'))
  28 - access("CTA"."CUST_TRX_TYPE_ID"="CTT"."CUST_TRX_TYPE_ID")
  29 - access("CTT"."GL_ID_REC"="GLC"."CODE_COMBINATION_ID")
  31 - filter("PASL"."DISABLE_FLAG" IS NULL)
  34 - access("PAA"."ITEM_ID"="CTL"."INVENTORY_ITEM_ID")
       filter("PAA"."ITEM_ID"="CTL"."INVENTORY_ITEM_ID")
  36 - access("PAA"."ASL_ID"="PASL"."ASL_ID"(+))
  38 - access("PAA2"."VENDOR_ID"="APS"."VENDOR_ID"(+))
  44 - access("HCCA"."CUST_ACCOUNT_ID"="CUST_ACCOUNT_ID" AND
              "HCSUA"."CUST_ACCT_SITE_ID"="HCCA"."CUST_ACCT_SITE_ID")
  45 - filter("HCCA"."ORG_ID"=82)
  46 - access("CUST"."CUST_ACCOUNT_ID"="CTA"."BILL_TO_CUSTOMER_ID")
  47 - access("HCSUA"."SITE_USE_ID"="CTA"."BILL_TO_SITE_USE_ID")
  48 - access("CTA"."CUST_TRX_TYPE_ID"="CTT"."CUST_TRX_TYPE_ID")
  50 - filter("CTT"."GL_ID_REC" IS NOT NULL AND ("CTT"."TYPE"='CM' OR "CTT"."TYP                                                                             
E"='INV'))
  51 - access("CTT"."GL_ID_REC"="GLC"."CODE_COMBINATION_ID")
  52 - filter("CTA"."COMPLETE_FLAG"='Y' AND "CTA"."STATUS_TRX"<>'VD' AND "CTA"."                                                                             
LEGAL_ENTITY_ID"=23274)
  53 - access("CTA"."TRX_DATE">=TO_DATE(' 2014-01-01 00:00:00', 'syyyy-mm-dd hh2                                                                             
4:mi:ss') AND
              "CTA"."TRX_DATE"<=TO_DATE(' 2014-10-13 00:00:00', 'syyyy-mm-dd hh2                                                                             
4:mi:ss'))
  54 - filter("HCSUA"."ORG_ID"=82)
  56 - access("CTA"."PRIMARY_SALESREP_ID"="VEND"."SALESREP_ID"(+))
  57 - access("PARTY_ID"="PARTY_ID")
  58 - access("CTL"."CUSTOMER_TRX_ID"="CTA"."CUSTOMER_TRX_ID")
  59 - filter("CTL"."INVENTORY_ITEM_ID" IS NULL AND "CTL"."LINE_TYPE"='LINE')
Note
   - 'PLAN_TABLE' is old version
Statistics
         15  recursive calls
          0  db block gets
   62543652  consistent gets
     269141  physical reads
        172  redo size
      12832  bytes sent via SQL*Net to client
        674  bytes received via SQL*Net from client
         16  SQL*Net roundtrips to/from client
          2  sorts (memory)
          0  sorts (disk)
        212  rows processed

Similar Messages

  • My MacBook Pro is running very slow when using the internet and sometimes gives the pinwheel of death, any suggestions on how to fix?

    My MacBook Pro is running very slow when using the internet and sometimes gives the pinwheel of death, any suggestions on how to fix?

    <http://www.thexlab.com/faqs/sbbod.html>

  • Oracle 10gr2 Master/detail form running very slow when you navigate to the detail record.

    Hi All, I have a master detail  form, running in webserver, when I navigate to the detail block, the form start buffering and buttering for about 2 min. There is a trigger when-new-record instance that is firing when you navigate to  a new record : The select part of this stament is taken a long time to execute. I modified this in toad and what used to take 25 seconds to run is taken less than a second now, but the slowness still persists in the form.
    for rec in (select wrrh_col
                      wpbh_col_lvd,
                       wpbh_col_doc_no
          from wh_col,
               wkpl_col,
               wh_col
         where wrrh_col_no = :block.wreh_wrrh_col_no
           and wrrh_col_no = wreh_wrrh_col_no
             and wrrh_col_no = wpbh_col_no
           and wrrh_col_proj    = wpbh_col_proj
           and wrrh_proj_no     = wpbh_proj_no) loop
       if fun_name(rec.wpbh_col_lvd) = 'Y' then                      
        do something,
       end if;
      end loop;
    The select staement that used to run for 23 seconds is running in less than one second, but the form is still running very slow when I navigate to the detail record.
    Please advise.
    Thanks.

    Thanks Andrea for your prompt response, the problem is the select statement and like I stated, I tuned the select statement in toad and what normally takes 23 secs is taking less than 1 sec to run. If I comment out the call to the function, it is still slow. The select stament will returned null and it will still be slow. When I comment out the for loop, it run very fast. I dont know what else to do than tuned the select statement.

  • Adobe Premier pro running very slow when rendering a file

    Adobe Premier pro running very slow when rendering a file

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    The title of the Console window should be All Messages. If it isn't, select
              SYSTEM LOG QUERIES ▹ All Messages
    from the log list on the left. If you don't see that list, select
              View ▹ Show Log List
    from the menu bar at the top of the screen. Click the Clear Display icon in the toolbar. Then take one of the actions that you're having trouble with. Select any messages that appear in the Console window. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    The log contains a vast amount of information, almost all of which is irrelevant to solving any particular problem. When posting a log extract, be selective. A few dozen lines are almost always more than enough.
    Please don't indiscriminately dump thousands of lines from the log into this discussion.
    Please don't post screenshots of log messages—post the text.
    Some private information, such as your name, may appear in the log. Anonymize before posting.

  • MacBook Pro run very slow when open Contacts

    My MacBook Pro (earlie 2011) run very slow. When open Contacs show the color ball. I can't see duplicates contacs.

    Back up all data.
    1. If you use iCloud, uncheck the box marked Contacts in the iCloud preference pane. Press return to confirm, or click  Keep on Mac in the dialog that opens.
    2. From the list of groups on the left side of the Contacts window, select All On My Mac. If that group doesn't exist or is empty, skip this step. Otherwise, from the menu bar, select
    File ▹ Export ▹ Export vCard
    Save the exported contacts to the Desktop.
    3. Quit Contacts. Triple-click the text on the line below on this page to select it, then copy it to the Clipboard (command-C):
    ~/Library/Application Support/AddressBook
    In the Finder, select
    Go ▹ Go to Folder
    from the menu bar, paste into the box that opens (command-V), and press return.
    A Finder window will open with a folder selected. Move the selected folder to the Desktop, leaving the window open for now.
    4. Launch Contacts. Your contacts will be gone. If you took Step 2, then double-click the file you created in that step and confirm that you want to import from it. Your contacts will reappear.
    5. Re-enable Contacts in the iCloud preference pane, if you disabled it. Test. If the issue is resolved, delete the AddressBook folder and the vCard file on the Desktop and close the open folder window.
    Otherwise, quit Contacts again and put the AddressBook folder back where it was, overwriting the newer one that will have been created in its place. Post your results.

  • Query is running very long when I bring in an attribute

    I am running into an issue when i bring in an attribute from the filter.  It is taking a very long time to display.  When i run the same query against the DSO i copied form it runs fast but not on the one I copied.  what could be the issue.

    So, you copied an existing report to a new report. Both the reports are on a DSO. Old report runs fine, but the new report runs very long. Is all this correct?
    How is the new report different? You said something about an attribute. Are you just displaying this attribute or are you filtering the results using this new attribute?
    Without understanding your question clearly, here is my speculation: Your selection filters on the new query are not in any DSO index.
    If I misunderstood your question and scenario, then please clarify.

  • My Macbook Pro runs VERY slow when unplugged. The battery charges and runs ok. Ran an SMC reset (no success), Safe mode (did not work), and hardware check (came back ok). What can I try next to fix this?

    Hello all,
    I am new to posting on this forum but I really hope that someone out there can help me out. I have a 13" MacBook Pro, 2.53 GHz Core 2 Duo, 4GB 1067 MHz DDR3, running OSX 10.6.8. My problem is that when I unplug the laptop form the charger and run it on the battery, the computer becomes unresponsive to any commands at all. It basically really slows down to a crawl. Even when rebooting it will take 5-10 minutes or more to do so. The odd thing is, when it gets plugged back in while any of this is going on, within a minute or two it works perfectly. It has been in a mac authorized repair shop for 7 weeks and has had a new logic board and a new hard drive replaced. The battery was tested and charges fine, holds a charge when unplugged, and the system profile shows the battery at Normal. Recently, many knowledgeable mac enthusiasts gave me tip that might help. Here is what I did: Ran an SMC reboot (no success), rebooted the computer under safe mode then unplugged it to test (no success), and ran a hardware test on the install disk (showed hardware ok)
    I am at a loss as to what to do next. It has become impossible to use this laptop for my classes when it is unplugged. I am about ready to just go buy a new one, and call this one a goner.
    I am hoping someone reading this can help with any other ideas on its problem. Help? Anyone?
    Steve

    LPBassman,
    since the tech in your IT department was able to copy your daughter’s data from her MacBook Pro’s internal disk, I’d suggest completely erasing the internal disk (using Disk Utility in Recovery mode, reformatting it with a “Mac OS Extended (Journaled)” filesystem), reïnstalling its original version of Mac OS X (either Snow Leopard from the grey Mac OS X Install DVD if it originally came with two grey DVDs, or Lion via OS X Internet Recovery if no grey DVDs originally came with it), running Software Update to get it to 10.6.8 or 10.7.5 respectively, reïnstalling Mavericks, running Software Update again to get it up to date, and finally restoring your daughter’s data.

  • Query is running very slow

    INSERT INTO IHUB.TMP_SUPPLIES_PO
    NEW_SCHEDULE_DATE,
    ORDER_TYPE,
    NEW_ORDER_QUANTITY,
    NEW_ORDER_PLACEMENT_DATE,
    FIRM_PLANNED_TYPE,
    LINE_ID,
    ORDER_NUMBER,
    SUBINVENTORY_CODE,
    ITEM_NAME,
    ORGANIZATION_CODE,
    SUPPLIER_NAME,
    SUPPLIER_SITE_CODE,
    COMMENTS,
    ORIGINAL_NEED_BY_DATE,
    PROMISED_DATE,
    NEED_BY_DATE,
    ACCEPTANCE_REQUIRED_FLAG,
    UOM_CODE,
    SR_INSTANCE_CODE,
    DELETED_FLAG,
    LAST_UPDATE_DATE,
    LAST_UPDATED_BY,
    CREATION_DATE,
    CREATED_BY,
    LAST_UPDATE_LOGIN,
    REQUEST_ID,
    PROGRAM_APPLICATION_ID,
    PROGRAM_ID,
    PROGRAM_UPDATE_DATE,
    PROCESS_FLAG
    SELECT DISTINCT F.DUE_DT AS NEW_SCHEDULE_DATE,
    1 AS ORDER_TYPE,
    ( F.QTY_PO_STD
    - NVL(xx_psft_to_ihub_pkg_rj.get_rcv_qty_supplies_po (F.BUSINESS_UNIT, F.PO_ID, F.LINE_NBR, F.SCHED_NBR, F.DISTRIB_LINE_NUM),0)
    + NVL(xx_psft_to_ihub_pkg_rj.get_rtv_qty_supplies_po (F.BUSINESS_UNIT, F.PO_ID, F.LINE_NBR, F.SCHED_NBR, F.DISTRIB_LINE_NUM),0)
    ) AS NEW_ORDER_QUANTITY,
    F.PO_DT AS NEW_ORDER_PLACEMENT_DATE,
    CASE WHEN F.FROZEN_FLG = 'N'
    THEN 2
    ELSE 1
    END AS FIRM_PLANNED_TYPE,
    1 AS LINE_ID,
    F.BUSINESS_UNIT
    || ':'
    || F.PO_ID
    || ':'
    || F.LINE_NBR
    || ':'
    || F.SCHED_NBR
    || ':'
    || F.DISTRIB_LINE_NUM AS ORDER_NUMBER,
    NULL AS SUBINVENTORY_CODE,
    F.INV_ITEM_ID AS ITEM_NAME,
    F.BUSINESS_UNIT_IN AS ORGANIZATION_CODE,
    H.NAME1 || ':' || F.VENDOR_ID as SUPPLIER_NAME,
    F.VNDR_LOC AS SUPPLIER_SITE_CODE,
    NULL AS COMMENTS,
    G.ORIG_PROM_DT AS ORIGINAL_NEED_BY_DATE,
    F.DUE_DT AS PROMISED_DATE,
    F.DUE_DT AS NEED_BY_DATE,
    'N' AS ACCEPTANCE_REQUIRED_FLAG,
    F.UNIT_OF_MEASURE AS UOM_CODE,
    'P',
    2,
    SYSDATE,
    SYSDATE,
    1173,
    58957,
    410496,
    724,
    56364,
    sysdate,
    1
    FROM SYSADM.PS_PL_ITEM_ATTRIB@FSUPGCLINK A,
    SYSADM.PS_BU_ITEMS_INV@FSUPGCLINK B,
    SYSADM.PS_MASTER_ITEM_TBL@FSUPGCLINK C,
    SYSADM.PS_PL_GROUP_IN@FSUPGCLINK E,
    SYSADM.PS_PL_PO_DIST_VW2@FSUPGCLINK F,
    SYSADM.PS_PO_LINE_SHIP@FSUPGCLINK G,
    SYSADM.PS_VENDOR@FSUPGCLINK H
    WHERE 1=1
    AND E.BU_GROUP = 'ASCP'
    AND A.PLANNED_BY <> '4'
    AND A.BUSINESS_UNIT = B.BUSINESS_UNIT
    AND A.INV_ITEM_ID = B.INV_ITEM_ID
    AND B.ITM_STATUS_CURRENT < '4'
    AND B.INV_ITEM_ID = C.INV_ITEM_ID
    AND C.ITM_STATUS_CURRENT < '4'
    AND C.SETID =
    (SELECT D.SETID
    FROM SYSADM.PS_SET_CNTRL_REC@FSUPGCLINK D
    WHERE D.RECNAME = 'MASTER_ITEM_TBL'
    AND D.SETCNTRLVALUE = A.BUSINESS_UNIT
    AND A.BUSINESS_UNIT = E.BUSINESS_UNIT
    AND A.BUSINESS_UNIT = F.BUSINESS_UNIT_IN
    AND A.INV_ITEM_ID = F.INV_ITEM_ID
    AND F.PO_STATUS <> 'C'
    AND F.BUSINESS_UNIT = G.BUSINESS_UNIT
    AND F.PO_ID = G.PO_ID
    AND F.LINE_NBR = G.LINE_NBR
    AND F.SCHED_NBR = G.SCHED_NBR
    AND F.VENDOR_SETID = H.SETID
    AND F.VENDOR_ID = H.VENDOR_ID
    AND ( F.QTY_PO_STD
    - NVL(xx_psft_to_ihub_pkg_rj.get_rcv_qty_supplies_po (F.BUSINESS_UNIT, F.PO_ID, F.LINE_NBR, F.SCHED_NBR, F.DISTRIB_LINE_NUM),0)
    + NVL(xx_psft_to_ihub_pkg_rj.get_rtv_qty_supplies_po (F.BUSINESS_UNIT, F.PO_ID, F.LINE_NBR, F.SCHED_NBR, F.DISTRIB_LINE_NUM),0)
    ) > 0

    Yes here is the execution plan for select statement I have already removed distict from the select. Also I am using oracle databases 11.2.0.2
    Execution Plan
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Inst |IN-OUT|
    | 0 | SELECT STATEMENT | | 1 | 287 | 2041 (2)| | |
    |* 1 | COUNT STOPKEY | | | | | | |
    |* 2 | FILTER | | | | | | |
    |* 3 | FILTER | | 3 | 27 | 1 (0)| | |
    | 4 | REMOTE | | | | | FSUPG~ | R->S |
    | 5 | REMOTE | PS_SET_CNTRL_REC | 1 | 25 | 3 (0)| FSUPG~ | R->S |
    Predicate Information (identified by operation id):
    1 - filter(ROWNUM<=3)
    2 - filter("C"."SETID"= (SELECT "D"."SETID" FROM "D" WHERE
    "D"."RECNAME"='MASTER_ITEM_TBL' AND "D"."SETCNTRLVALUE"=:B1))
    3 - filter("F"."QTY_PO_STD"-NVL("XX_PSFT_TO_IHUB_PKG_RJ"."GET_RCV_QTY_SUPPLIES_
    PO"("F"."BUSINESS_UNIT","F"."PO_ID","F"."LINE_NBR","F"."SCHED_NBR","F"."DISTRIB_LI
    NE_NUM"),0)+NVL("XX_PSFT_TO_IHUB_PKG_RJ"."GET_RTV_QTY_SUPPLIES_PO"("F"."BUSINESS_U
    NIT","F"."PO_ID","F"."LINE_NBR","F"."SCHED_NBR","F"."DISTRIB_LINE_NUM"),0)>0)
    Remote SQL Information (identified by operation id):
    4 - SELECT "A1"."BU_GROUP","A1"."BUSINESS_UNIT","A2"."BUSINESS_UNIT","A2"."INV_
    ITEM_ID","A2"."PLANNED_BY","A3"."BUSINESS_UNIT","A3"."PO_ID","A3"."LINE_NBR","A3".
    "SCHED_NBR","A3"."DISTRIB_LINE_NUM","A3"."INV_ITEM_ID","A3"."UNIT_OF_MEASURE","A3"
    ."DUE_DT","A3"."FROZEN_FLG","A3"."QTY_PO_STD","A3"."BUSINESS_UNIT_IN","A3"."PO_STA
    TUS","A3"."PO_DT","A3"."VENDOR_SETID","A3"."VENDOR_ID","A3"."VNDR_LOC","A4"."SETID
    ","A4"."VENDOR_ID","A4"."NAME1","A5"."BUSINESS_UNIT","A5"."INV_ITEM_ID","A5"."ITM_
    STATUS_CURRENT","A6"."BUSINESS_UNIT","A6"."PO_ID","A6"."LINE_NBR","A6"."SCHED_NBR"
    ,"A6"."ORIG_PROM_DT","A7"."SETID","A7"."INV_ITEM_ID","A7"."ITM_STATUS_CURRENT"
    FROM "SYSADM"."PS_PL_GROUP_IN" "A1","SYSADM"."PS_PL_ITEM_ATTRIB"
    "A2","SYSADM"."PS_PL_PO_DIST_VW2" "A3","SYSADM"."PS_VENDOR"
    "A4","SYSADM"."PS_BU_ITEMS_INV" "A5","SYSADM"."PS_PO_LINE_SHIP"
    "A6","SYSADM"."PS_MASTER_ITEM_TBL" "A7" WHERE "A7"."ITM_STATUS_CURRENT"<'4' AND
    "A5"."INV_ITEM_ID"="A7"."INV_ITEM_ID" AND
    "A3"."BUSINESS_UNIT"="A6"."BUSINESS_UNIT" AND "A3"."PO_ID"="A6"."PO_ID" AND
    "A3"."LINE_NBR"="A6"."LINE_NBR" AND "A3"."SCHED_NBR"="A6"."SCHED_NBR" AND
    "A5"."ITM_STATUS_CURRENT"<'4' AND "A2"."BUSINESS_UNIT"="A5"."BUSINESS_UNIT" AND
    "A2"."INV_ITEM_ID"="A5"."INV_ITEM_ID" AND "A3"."VENDOR_SETID"="A4"."SETID" AND
    "A3"."VENDOR_ID"="A4"."VENDOR_ID" AND "A3"."PO_STATUS"<>'C' AND
    "A2"."INV_ITEM_ID"="A3"."INV_ITEM_ID" AND
    "A2"."BUSINESS_UNIT"="A3"."BUSINESS_UNIT_IN" AND "A2"."PLANNED_BY"<>'4' AND
    "A2"."BUSINESS_UNIT"="A1"."BUSINESS_UNIT" AND "A1"."BU_GROUP"='ASCP' (accessing
    'FSUPGCLINK.OII.OCEANEERING.COM' )
    5 - SELECT "SETCNTRLVALUE","RECNAME","SETID" FROM "SYSADM"."PS_SET_CNTRL_REC"
    "D" WHERE "RECNAME"='MASTER_ITEM_TBL' AND "SETCNTRLVALUE"=:1 (accessing
    'FSUPGCLINK.OII.OCEANEERING.COM' )
    Note
    - 'PLAN_TABLE' is old version
    Statistics
    89 recursive calls
    24 db block gets
    8 consistent gets
    0 physical reads
    0 redo size
    3164 bytes sent via SQL*Net to client
    524 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    3 rows processed
    SQL> SQL>
    SQL>

  • Script that runs very slow when exporting output to XLS file

    I am using TOAD for oracle to export result to XLS. Need help on this script to chec how can I speed up the process:
    select a.div, a.zname, a.MBr, a.Loc,a.lname, b.mid as SLID, c.slname, a.FDID, b.FName as FDNAME,
    a.apptdate,b."Contact Nos",
    b."Credit Line",b."PastDue Acct"
    From
    select zname, Loccode,
    lname,
    FDID,
    ApptDate,
    div,
    MainBr
    from tbl1
    )a,
    select distid,name,managerid, dayphoneno || ' ' || mobilephoneno as "Contact Nos",
    street || ' ' || zip as Address,
    dealercreditamt as "Credit Line",
    pastdueamt as "PastDue Acct"
    from tbl2@DB2
    )b,
    select distid slid,name slname from tbl2@DB2
    )c
    where a.FDID=b.DISTID
    and b.distid=c.slid;
    SQL> @?/RDBMS/ADMIN/UTLXPLS
    PLAN_TABLE_OUTPUT
    | Id | Operation | Name | Rows | Bytes | Cost |
    | 0 | SELECT STATEMENT | | 2137K| 515M| 243K|
    | 1 | HASH JOIN | | 2137K| 515M| 243K|
    | 2 | TABLE ACCESS FULL | tbl1 | 62280 | 4074K| 66 |
    | 3 | HASH JOIN | | 2137K| 379M| 236K|
    | 4 | REMOTE | | 2137K| 124M| 114K|
    | 5 | REMOTE | | 2137K| 254M| 114K|
    --------------------------------------------------------------------------

    mrp wrote:
    I am using TOAD for oracle to export result to XLS. Need help on this script to chec how can I speed up the process:XLS is a poor output format for larger result sets. Why? because all tools that I know use a kind of cell-by-cell processing to fill the fetched values into Excel.
    It is way faster to output into any kind of text (CSV) format.

  • Update Query is running very slow

    Database version 11.2.0.2
         UPDATE ps_jrnl_ln a SET a.jrnl_line_status = :"SYS_B_0" WHERE a.project_id = :"SYS_B_1" AND a.account IN ( SELECT DISTINCT c.account FROM PSTREENODE A , PSTREELEAF B , PS_OI_NODE_BAL_PC G , PS_GL_ACCOUNT_TBL C WHERE A.EFFDT = ( SELECT MAX(X.EFFDT) FROM PSTREEDEFN X WHERE A.SETID = X.SETID AND A.TREE_NAME = X.TREE_NAME) AND B.SETID = A.SETID AND A.TREE_NODE = G.TREE_NODE AND A.TREE_NAME = G.TREE_NAME AND g.activeflag = :"SYS_B_2" AND B.TREE_NAME = A.TREE_NAME AND B.EFFDT = A.EFFDT AND B.TREE_NODE_NUM BETWEEN A.TREE_NODE_NUM AND A.TREE_NODE_NUM_END AND C.ACCOUNT BETWEEN B.RANGE_FROM AND B.RANGE_TO) AND EXISTS ( SELECT :"SYS_B_3" FROM PS_JRNL_HEADER C WHERE A.BUSINESS_UNIT = C.BUSINESS_UNIT AND A.JOURNAL_ID = C.JOURNAL_ID AND A.JOURNAL_DATE = C.JOURNAL_DATE AND C.JOURNAL_LOCKED = :"SYS_B_4" AND C.PROCESS_INSTANCE = :"SYS_B_5")
    {Code}
    Execution Plan--------------------------------------------------------------------------------------------------------------
    | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
    | 0 | UPDATE STATEMENT | | 5 | 395 | | 10586 (17)| 00:02:08 |
    | 1 | UPDATE | PS_JRNL_LN | | | | | |
    |* 2 | HASH JOIN SEMI | | 5 | 395 | | 10586 (17)| 00:02:08 |
    | 3 | NESTED LOOPS | | 5 | 360 | | 19 (6)| 00:00:01 |
    | 4 | SORT UNIQUE | | 5 | 165 | | 6 (0)| 00:00:01 |
    | 5 | TABLE ACCESS BY INDEX ROWID | PS_JRNL_HEADER | 5 | 165 | | 6 (0)| 00:00:01 |
    |* 6 | INDEX RANGE SCAN | PSZJRNL_HEADER | 5 | | | 3 (0)| 00:00:01 |
    |* 7 | TABLE ACCESS BY INDEX ROWID | PS_JRNL_LN | 1 | 39 | | 4 (0)| 00:00:01 |
    |* 8 | INDEX RANGE SCAN | PS_JRNL_LN | 1 | | | 3 (0)| 00:00:01 |
    | 9 | VIEW | VW_NSO_1 | 378K| 2585K| | 10565 (17)| 00:02:07 |
    |* 10 | FILTER | | | | | | |
    |* 11 | HASH JOIN | | 68M| 9738M| | 10561 (17)| 00:02:07 |
    | 12 | INDEX FAST FULL SCAN | PSAPSTREENODE | 23610 | 1175K| | 63 (0)| 00:00:01 |
    | 13 | MERGE JOIN | | 90M| 8548M| | 9370 (7)| 00:01:53 |
    | 14 | SORT JOIN | | 670 | 30150 | | 6 (17)| 00:00:01 |
    | 15 | MERGE JOIN CARTESIAN | | 670 | 30150 | | 5 (0)| 00:00:01 |
    |* 16 | TABLE ACCESS FULL | PS_OI_NODE_BAL_PC | 2 | 80 | | 3 (0)| 00:00:01 |
    | 17 | BUFFER SORT | | 335 | 1675 | | 2 (0)| 00:00:01 |
    | 18 | INDEX FAST FULL SCAN | PSAGL_ACCOUNT_TBL | 335 | 1675 | | 1 (0)| 00:00:01 |
    |* 19 | FILTER | | | | | | |
    |* 20 | SORT JOIN | | 562K| 28M| 77M| 8778 (1)| 00:01:46 |
    | 21 | INDEX FAST FULL SCAN | PSCPSTREELEAF | 562K| 28M| | 1315 (1)| 00:00:16 |
    | 22 | SORT AGGREGATE | | 1 | 25 | | | |
    | 23 | FIRST ROW | | 1 | 25 | | 2 (0)| 00:00:01 |
    |* 24 | INDEX RANGE SCAN (MIN/MAX)| PSBPSTREEDEFN | 1 | 25 | | 2 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    2 - access("A"."ACCOUNT"="ACCOUNT")
    6 - access("C"."PROCESS_INSTANCE"=TO_NUMBER(:SYS_B_5) AND "C"."JOURNAL_LOCKED"=:SYS_B_4)
    7 - filter("A"."PROJECT_ID"=:SYS_B_1)
    8 - access("A"."BUSINESS_UNIT"="C"."BUSINESS_UNIT" AND "A"."JOURNAL_ID"="C"."JOURNAL_ID" AND
    SYS_OP_DESCEND("JOURNAL_DATE")=SYS_OP_DESCEND("C"."JOURNAL_DATE"))
    filter(SYS_OP_UNDESCEND(SYS_OP_DESCEND("JOURNAL_DATE"))="C"."JOURNAL_DATE")
    10 - filter("A"."EFFDT"= (SELECT MAX("X"."EFFDT") FROM "PSTREEDEFN" "X" WHERE "X"."TREE_NAME"=:B1
    AND "X"."SETID"=:B2))
    11 - access("B"."SETID"="A"."SETID" AND "A"."TREE_NODE"="G"."TREE_NODE" AND
    "A"."TREE_NAME"="G"."TREE_NAME" AND "B"."TREE_NAME"="A"."TREE_NAME" AND "B"."EFFDT"="A"."EFFDT")
    filter("B"."TREE_NODE_NUM">="A"."TREE_NODE_NUM" AND
    "B"."TREE_NODE_NUM"<="A"."TREE_NODE_NUM_END")
    16 - filter("G"."ACTIVEFLAG"=TO_NUMBER(:SYS_B_2))
    19 - filter("C"."ACCOUNT"<="B"."RANGE_TO")
    20 - access(INTERNAL_FUNCTION("C"."ACCOUNT")>=INTERNAL_FUNCTION("B"."RANGE_FROM"))
    filter(INTERNAL_FUNCTION("C"."ACCOUNT")>=INTERNAL_FUNCTION("B"."RANGE_FROM"))
    24 - access("X"."SETID"=:B1 AND "X"."TREE_NAME"=:B2)
    52 rows selected.

    I don't see any benefit of the extenal conversion. Cost is still same.
    | Id  | Operation                        | Name              | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
    |   0 | UPDATE STATEMENT                 |                   |     5 |   395 |       | 10586  (17)| 00:02:08 |
    |   1 |  UPDATE                          | PS_JRNL_LN        |       |       |       |            |          |
    |*  2 |   HASH JOIN SEMI                 |                   |     5 |   395 |       | 10586  (17)| 00:02:08 |
    |   3 |    NESTED LOOPS                  |                   |     5 |   360 |       |    19   (6)| 00:00:01 |
    |   4 |     SORT UNIQUE                  |                   |     5 |   165 |       |     6   (0)| 00:00:01 |
    |   5 |      TABLE ACCESS BY INDEX ROWID | PS_JRNL_HEADER    |     5 |   165 |       |     6   (0)| 00:00:01 |
    |*  6 |       INDEX RANGE SCAN           | PSZJRNL_HEADER    |     5 |       |       |     3   (0)| 00:00:01 |
    |*  7 |     TABLE ACCESS BY INDEX ROWID  | PS_JRNL_LN        |     1 |    39 |       |     4   (0)| 00:00:01 |
    |*  8 |      INDEX RANGE SCAN            | PS_JRNL_LN        |     1 |       |       |     3   (0)| 00:00:01 |
    |   9 |    VIEW                          | VW_NSO_1          |   378K|  2585K|       | 10565  (17)| 00:02:07 |
    |* 10 |     FILTER                       |                   |       |       |       |            |          |
    |* 11 |      HASH JOIN                   |                   |    68M|  9738M|       | 10561  (17)| 00:02:07 |
    |  12 |       INDEX FAST FULL SCAN       | PSAPSTREENODE     | 23610 |  1175K|       |    63   (0)| 00:00:01 |
    |  13 |       MERGE JOIN                 |                   |    90M|  8548M|       |  9370   (7)| 00:01:53 |
    |  14 |        SORT JOIN                 |                   |   670 | 30150 |       |     6  (17)| 00:00:01 |
    |  15 |         MERGE JOIN CARTESIAN     |                   |   670 | 30150 |       |     5   (0)| 00:00:01 |
    |* 16 |          TABLE ACCESS FULL       | PS_OI_NODE_BAL_PC |     2 |    80 |       |     3   (0)| 00:00:01 |
    |  17 |          BUFFER SORT             |                   |   335 |  1675 |       |     2   (0)| 00:00:01 |
    |  18 |           INDEX FAST FULL SCAN   | PSAGL_ACCOUNT_TBL |   335 |  1675 |       |     1   (0)| 00:00:01 |
    |* 19 |        FILTER                    |                   |       |       |       |            |          |
    |* 20 |         SORT JOIN                |                   |   562K|    28M|    77M|  8778   (1)| 00:01:46 |
    |  21 |          INDEX FAST FULL SCAN    | PSCPSTREELEAF     |   562K|    28M|       |  1315   (1)| 00:00:16 |
    |  22 |      SORT AGGREGATE              |                   |     1 |    25 |       |            |          |
    |  23 |       FIRST ROW                  |                   |     1 |    25 |       |     2   (0)| 00:00:01 |
    |* 24 |        INDEX RANGE SCAN (MIN/MAX)| PSBPSTREEDEFN     |     1 |    25 |       |     2   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - access("A"."ACCOUNT"="ACCOUNT")
       6 - access("C"."PROCESS_INSTANCE"=TO_NUMBER(:SYS_B_5) AND "C"."JOURNAL_LOCKED"=:SYS_B_4)
       7 - filter("A"."PROJECT_ID"=:SYS_B_1)
       8 - access("A"."BUSINESS_UNIT"="C"."BUSINESS_UNIT" AND "A"."JOURNAL_ID"="C"."JOURNAL_ID" AND
                  SYS_OP_DESCEND("JOURNAL_DATE")=SYS_OP_DESCEND("C"."JOURNAL_DATE"))
           filter(SYS_OP_UNDESCEND(SYS_OP_DESCEND("JOURNAL_DATE"))="C"."JOURNAL_DATE")
      10 - filter("A"."EFFDT"= (SELECT MAX("X"."EFFDT") FROM "PSTREEDEFN" "X" WHERE "X"."TREE_NAME"=:B1
                  AND "X"."SETID"=:B2))
      11 - access("B"."SETID"="A"."SETID" AND "A"."TREE_NODE"="G"."TREE_NODE" AND
                  "A"."TREE_NAME"="G"."TREE_NAME" AND "B"."TREE_NAME"="A"."TREE_NAME" AND "B"."EFFDT"="A"."EFFDT")
           filter("B"."TREE_NODE_NUM">="A"."TREE_NODE_NUM" AND
                  "B"."TREE_NODE_NUM"<="A"."TREE_NODE_NUM_END")
      16 - filter("G"."ACTIVEFLAG"=TO_NUMBER(:SYS_B_2))
      19 - filter("C"."ACCOUNT"<="B"."RANGE_TO")
      20 - access(INTERNAL_FUNCTION("C"."ACCOUNT")>=INTERNAL_FUNCTION("B"."RANGE_FROM"))
           filter(INTERNAL_FUNCTION("C"."ACCOUNT")>=INTERNAL_FUNCTION("B"."RANGE_FROM"))
      24 - access("X"."SETID"=:B1 AND "X"."TREE_NAME"=:B2)
    52 rows selected.

  • MS-Access query running very slow

    Hi,
    We've MS-Access application which was pointing to UDB. Now we migrated it to point Oracle DB 9.2. After migration some of the query is running very slow.
    These queries used to take less than 30 seconds in UDB now taking more than 5 Minutes in Oracle.
    some more obeservation :
    (1) Some of the queries using "HAVING" clause without any aggregate function. When I moved this condition to "WHERE" clause, performance improved a lot.
    But problem is that I can't suggest this solution to "USERS". They are creating query using "query wizard" in MS-Access and they started creating noise on this.
    (2) I tested same MDB in two different PCs and same query is returning records in 4 seconds in one system, is taking more than 10 minutes in other system.
    Since I'm new to MS-Access, I don't know what other information I need to provide here.
    Please help me out.

    I have seen the problem like this,too
    can i have you

  • Oracle query running very slow

    Hi,
    We've MS-Access application which was pointing to UDB. Now we migrated it to point Oracle DB 9.2. After migration some of the query is running very slow.
    These queries used to take less than 30 seconds in UDB now taking more than 5 Minutes in Oracle.
    some more obeservation :
    (1) Some of the queries using "HAVING" clause without any aggregate function. When I moved this condition to "WHERE" clause, performance improved a lot.
    But problem is that I can't suggest this solution to "USERS". They are creating query using "query wizard" in MS-Access and they started creating noise on this.
    (2) I tested same MDB in two different PCs and same query is returning records in 4 seconds in one system, is taking more than 10 minutes in other system.
    Since I'm new to MS-Access, I don't know what other information I need to provide here.
    Please help me out.

    ms wrote:
    Hi All
    I am using Oracle 11g . My table contains 10-12 lac rows.Do not use the word lac: it is common in the Indian sub-continent but not known much outside of
    there because it is not standard English.
    >
    1) what is the difference between a index on one column and an index of number of columns ( i.e composite index). The obvious answer of one contains only one column and the other contains more than one.
    2) For what columns in a where clause should index be created ( single columns index or composite index ).Depends
    3) Also can u suggest how to improve the perfomane of thsi query?Please read: SQL and PL/SQL FAQ
    which tells you how to ask a performance related question

  • Report region runs very slow, but its sql runs fast

    We have a page with a report region Type :SQL Query (plsq function body returning sql query) which runs very slow, pegging the tach on our db box for almost a minute before returning report rows. However, if we run the generated sql from sql plus, it returns all the rows in under 10 seconds with nary a blip on the box. Any idas how what could be causing this or how to debug?
    Thanks,
    Steve

    OK, here is the bad boy, shortly after our code that returns the data.
    declare
    rc__ number;
    simple_list__ owa_util.vc_arr;
    complex_list__ owa_util.vc_arr;
    begin
    owa.init_cgi_env(:n__,:nm__,:v__);
    htp.HTBUF_LEN := 63;
    null;
    null;
    simple_list__(1) := 'sys.%';
    simple_list__(2) := 'dbms\_%';
    simple_list__(3) := 'utl\_%';
    simple_list__(4) := 'owa\_%';
    simple_list__(5) := 'owa.%';
    simple_list__(6) := 'htp.%';
    simple_list__(7) := 'htf.%';
    simple_list__(8) := 'wpg_docload.%';
    if ((owa_match.match_pattern(p_string =>
    'f'
    /* */,p_simple_pattern =>
    simple_list__
    ,p_complex_pattern =>
    complex_list__
    ,p_use_special_chars =>
    false)))
    then
    rc__ := 2;
    else
    null;
    null;
    f(p=>:p);
    if (wpg_docload.is_file_download) then
    rc__ := 1;
    wpg_docload.get_download_file(:doc_info);
    null;
    null;
    null;
    commit;
    else
    rc__ := 0;
    null;
    null;
    null;
    commit;
    owa.get_page(:data__,:ndata__);
    end if;
    end if;
    :rc__ := rc__;
    end;
    call count cpu elapsed disk query current rows
    Parse 0 0.00 0.00 0 0 0 0
    Execute 1 25.53 26.59 4492 20992 60 1
    Fetch 0 0.00 0.00 0 0 0 0
    total 1 25.53 26.59 4492 20992 60 1

  • Please help our macbook pro is running very slow after recent update.

    After updating a few months ago our macbook that was faultless before is running very slow,
    when typing the beachball spins for ages before it appears ect
    didn't do any backups or use time machine so i have no idea what to do.
    Thanks

    EtreCheck version: 2.1.5 (108)
    Report generated 1 January 2015 21:26:59 GMT
    Click the [Support] links for help with non-Apple products.
    Click the [Details] links for more information about that line.
    Click the [Adware] links for help removing adware.
    Hardware Information: ℹ️
      MacBook Pro (13-inch, Late 2011) (Verified)
      MacBook Pro - model: MacBookPro8,1
      1 2.4 GHz Intel Core i5 CPU: 2-core
      4 GB RAM Upgradeable
      BANK 0/DIMM0
      2 GB DDR3 1333 MHz ok
      BANK 1/DIMM0
      2 GB DDR3 1333 MHz ok
      Bluetooth: Old - Handoff/Airdrop2 not supported
      Wireless:  en1: 802.11 a/b/g/n
    Video Information: ℹ️
      Intel HD Graphics 3000 - VRAM: 384 MB
      Color LCD 1280 x 800
    System Software: ℹ️
      OS X 10.10.1 (14B25) - Uptime: 5 days 1:26:25
    Disk Information: ℹ️
      ST9500325ASG disk0 : (500.11 GB)
      EFI (disk0s1) <not mounted> : 210 MB
      Recovery HD (disk0s3) <not mounted>  [Recovery]: 650 MB
      Macintosh HD (disk1) / : 498.88 GB (411.49 GB free)
      Encrypted AES-XTS Unlocked Failed
      Core Storage: disk0s2 499.25 GB Online
      HL-DT-ST DVDRW  GS31N 
    USB Information: ℹ️
      Apple Inc. FaceTime HD Camera (Built-in)
      Apple Inc. BRCM2070 Hub
      Apple Inc. Bluetooth USB Host Controller
      Apple Inc. Apple Internal Keyboard / Trackpad
      Apple Computer, Inc. IR Receiver
    Thunderbolt Information: ℹ️
      Apple Inc. thunderbolt_bus
    Gatekeeper: ℹ️
      Mac App Store and identified developers
    Kernel Extensions: ℹ️
      /System/Library/Extensions
      [loaded] com.Cycling74.driver.Soundflower (1.5.1) [Support]
      [not loaded] com.leapfrog.codeless.kext (2) [Support]
      [not loaded] com.leapfrog.driver.LfConnectDriver (1.9.8 - SDK 10.7) [Support]
    Problem System Launch Agents: ℹ️
      [invalid?] com.VTech.AgentMonitor.plist [Support]
    Launch Agents: ℹ️
      [running] com.Affinegy.InstaLANa.plist [Support]
      [loaded] com.hp.messagecenter.launcher.plist [Support]
      [loaded] com.oracle.java.Java-Updater.plist [Support]
    Launch Daemons: ℹ️
      [loaded] com.adobe.fpsaud.plist [Support]
      [running] com.iobit.AMCDaemon.plist [Support]
      [loaded] com.leapfrog.connect.authdaemon.plist [Support]
      [loaded] com.oracle.java.Helper-Tool.plist [Support]
      [loaded] com.oracle.java.JavaUpdateHelper.plist [Support]
    User Launch Agents: ℹ️
      [loaded] com.adobe.ARM.[...].plist [Support]
      [failed] com.facebook.videochat.[redacted].plist [Support]
      [invalid?] com.iobit.AMCUpdate.plist [Support]
      [running] com.leapfrog.connect.monitor.plist [Support]
      [loaded] com.spotify.webhelper.plist [Support]
      [not loaded] com.user.UninstallAD.plist [Support]
    User Login Items: ℹ️
      Steam UNKNOWN (missing value)
      iTunesHelper ApplicationHidden (/Applications/iTunes.app/Contents/MacOS/iTunesHelper.app)
      MenuTab for Facebook UNKNOWN (missing value)
      AdobeResourceSynchronizer ApplicationHidden (/Applications/Adobe Reader.app/Contents/Support/AdobeResourceSynchronizer.app)
      Spotify UNKNOWN (missing value)
      Spotify UNKNOWN (missing value)
      Safari Application (/Applications/Safari.app)
    Internet Plug-ins: ℹ️
      FlashPlayer-10.6: Version: 16.0.0.235 - SDK 10.6 [Support]
      AmazonMP3DownloaderPlugin101737: Version: Unknown
      AdobePDFViewerNPAPI: Version: 10.1.12 [Support]
      AdobePDFViewer: Version: 10.1.12 [Support]
      CouponPrinter-FireFox_v2: Version: 1.1.10 - SDK 10.6 [Support]
      Flash Player: Version: 16.0.0.235 - SDK 10.6 [Support]
      Default Browser: Version: 600 - SDK 10.10
      QuickTime Plugin: Version: 7.7.3
      Silverlight: Version: 5.1.20913.0 - SDK 10.6 [Support]
      JavaAppletPlugin: Version: Java 8 Update 25 Check version
    3rd Party Preference Panes: ℹ️
      Flash Player  [Support]
      Growl  [Support]
      Java  [Support]
    Time Machine: ℹ️
      Time Machine not configured!
    Top Processes by CPU: ℹ️
         28% softwareupdated
          4% WindowServer
          2% Safari
          0% fontd
          0% AppleSpell
    Top Processes by Memory: ℹ️
      259 MB com.apple.WebKit.WebContent
      236 MB loginwindow
      107 MB Finder
      90 MB ocspd
      82 MB softwareupdated
    Virtual Memory Information: ℹ️
      25 MB Free RAM
      1.61 GB Active RAM
      1.60 GB Inactive RAM
      1.06 GB Wired RAM
      1.71 GB Page-ins
      1 MB Page-outs

  • Printer runs very slow.

    I have a HP photosmart 3300 all in one printer.  It runs very slow when printing.  Do you know of a cure?

    printer head problem need ching
    tecnical support for hp printing

Maybe you are looking for