Update stmt take several hours to get updated about half million records in a Table

Hello

Target WC_PROCUREMENT_FS table contains about 1.3 million records and under post ETL to update stmt take several hours to update the table. I think that 3rd stmt with XX_PROCUREMENT_BI package with the function 'GET_EXCHANGE_RATE' is time consuming. Please suggest if there is a way to improve performance.

UPDATE WC_PROCUREMENT_FS OP

The VALUE of OP. RELEASE_AMT_FN_CCY = (SELECT SUM (OP1. PO_AMOUNT_FN_CCY) OF WC_PROCUREMENT_FS OP1

WHERE OP1. SUBJECT_CODE IN ("PO")

AND OP1. TYPE NO ('CONTRACT', 'COVER')

AND OP1. TRANSACTION_LINE! = "NA".

AND OP1. PO_REFERENCE_NO = OP. TRANSACTION_NO)

Op. RELEASE_AMT_GBL_CCY = (SELECT SUM (OP1. PO_AMOUNT_GBL_CCY) OF WC_PROCUREMENT_FS OP1

WHERE OP1. SUBJECT_CODE IN ("PO")

AND OP1. TYPE NO ('CONTRACT', 'COVER')

AND OP1. TRANSACTION_LINE! = "NA".

AND OP1. PO_REFERENCE_NO = OP. TRANSACTION_NO)

Op. RELEASE_AMT_TRN_CCY = (SELECT SUM (ROUND (DECODE (OP. TRN_CCY, OP1. TRN_CCY, OP1. PO_AMOUNT_TRN_CCY, OP1. PO_AMOUNT_FN_CCY * nvl

(XX_PROCUREMENT_BI. GET_EXCHANGE_RATE (OP1. FN_CCY, OP. ((TRN_CCY, 'Corporate', OP.GL_DATE), 1)), 2))

OF WC_PROCUREMENT_FS OP1

WHERE OP1. SUBJECT_CODE IN ("PO")

AND OP1. TYPE NO ('CONTRACT', 'COVER')

AND OP1. TRANSACTION_LINE! = "NA".

AND OP1. PO_REFERENCE_NO = OP. TRANSACTION_NO)

WHERE OP. SUBJECT_CODE IN ("PO")

AND OP. TYPE ('CONTRACT', 'COVER')

AND OP. TRANSACTION_LINE = "NA";


Thank you for your help.

Thank you

Jay.

Hi Jay,.

Try this.

MERGE IN wc_procurement_fs op

USING (SELECT op1.po_reference_no, SUM (op1.po_amount_fn_ccy) c1,

SUM (op1.po_amount_gbl_ccy) c2,

SUM

(ROUND

(DECODE

(op.trn_ccy,

OP1.trn_ccy, op1.po_amount_trn_ccy,

OP1.po_amount_fn_ccy

* NVL

(xx_procurement_bi.get_exchange_rate

(op1.fn_ccy,

op.trn_ccy,

"Corporate."

op.gl_date

),

1

)

),

2

)

) c3

OF wc_procurement_fs op1

WHERE op1.subject_code IN ("PO")

AND op1. TYPE NO ('CONTRACT', 'COVER')

AND op1.transaction_line! = "NA".

GROUP BY op1.po_reference_no) CBC

WE (op1.po_reference_no = op.transaction_no)

WHEN MATCHED THEN

UPDATE

SET op.release_amt_fn_ccy = src.c1, op.release_amt_gbl_ccy = src.c2,

op.release_amt_trn_ccy = src.c3

;

Tags: Database

Similar Questions

  • WHY it takes literally HOURS to get my latest CC of Photoshop, etc operational? I (we) paid for a new year of service some time ago and I literally lost half of its value by the loss of business just sitting here waiting on this download. UNITED NATIONS

    WHY it takes literally HOURS to get my latest CC of Photoshop, etc operational? I (we) paid for a new year of service some time ago and I literally lost half of its value by the loss of business just sitting here waiting on this download. Unacceptable. Is it possible to speed up this process. Only takes seconds for the $$$ to be deducted.

    Hi Jeffery,

    Please refer to the help documents below to download the application Adobe CC:

    Creative cloud to desktop

    Download, install, update or uninstall applications

    Kind regards

    Sheena

  • When I try to copy a single file (for example: size of 1 GB) drive hard to any what external memory device via the USB port, the copy process takes several hours to complete

    I use a DELL Studio 15 laptop computer. When I try to copy a single file (for example: size of 1 GB) hard drive to any external memory device (for example: USB key or external hard drive) via the port USB, the copy process takes several hours to complete. I have checked the viruses using McAfee Antivirus, but could not find. Can someone suggest me a solution?

    Hello

    ·          Were there any changes made to your computer before this problem?

    Step 1: Format the external device to the NTFS format and check if the problem persists.

    See: http://windows.microsoft.com/en-US/windows-vista/Convert-a-hard-disk-or-partition-to-NTFS-format

  • Streaming iTunes content can take several hours to download for display

    The streaming content from the iTunes store at the same time an AppleTV 3 and bought 4 takes up to 14 hours before it will play!  (it was always the slowest speed, but movies usually take more 2 hours and good TV episodes more than an hour)

    I have 45 Mbs U-verse internet connection.  The two AppleTV are not wireless, Wired.

    It seems that you do not get the full speed since the iTunes servers. You use the provider's DNS, or you doing something clever (OpenDNS, Google, etc.)? I guess that you are not using a VPN.

  • Emails from blackBerry Smartphones now take several hours to reach handset BB: dept IT don't believe me!

    Have a BB 8310 on a British provider (O2).  It's a working BB so everything is done by the IT Department and the company's server.  The first weeks it worked fine.  Last week, I noticed that I wasn't getting emails. As I was on vacation, I wasn't too worried, but then I realized that I had not received emails for a day or two.  Check on my laptop, I had received a lot of emails in the intermediate days.  The BB just seemed to be stopped automatically reconclining with my Outlook.

    Switch the phone on, turn off, forcing him to reconcile or remove an email on my BB seems to force to reconcile and will solve the problem temporarily.  The handset will behave so for an hour or two and then seems to go back to sleep.  It takes hours for an email coming through the handset and it's just bcause (I think) I went in a place with little or no service and when it detects a signal once again, he is reconciled with Outlook.

    Back the BB to my local IT Department.  They went on and outside telephone, sent a test email (which happens quickly) and told me it was fixed (haven't tried to tell them that it is only a temporary fix). After persuading, they kept their hands on the BB for a few hours and sent emails from test etc which have all failed to pass through. Advisable to take for our largest IT Department.

    Went through the same thing with them, but they do not see a problem (Yes, they he turns on and turns off again and of course the test e-mail came through). Would not quite believe me when I told them what was going on.  It's my second BB so I'm confident enough to use it etc so I can't imagine!

    Any ideas of what to do or what to say the IT Department to do?

    Thank you.

    Steven

    Thanks for the email.  Tried your suggestion, but nothing helped.  I had to restore the CMIME file.  I will send it to the IT Department once more!

    Thanks again.

    Steven

  • You can get a list of the records in a table in Word or Excel file?

    I want to include an annotated list of contents of the folder in a Word document.  Can one get a list of the Explorer of a Word in Excel table?

    Select one of the files and press Ctrl-A. Hold the SHIFT key, then right click and select copy in the path. Switch to your Word or Excel file, and then press Ctrl + V.

    Noel

  • Get the value of the record in the table and set the Disabled property...

    Hello! I have the table in my JSPX page. I search for records and that you press one of the files with a right click, see: http://my.jetscreenshot.com/2677/20120203-fas1-30kb
    I put property disabled like that of my commandMenuItem:
    #{row.GenResGrupa != 'true'}
    But as you can see in my photo above, the disabled property do not work. Where I am wrong with my code:
     <af:commandMenuItem text="#{sampleBundle.pases}"
                                                  id="commandMenuItem1"
                                                  action="adfMenu_pasesDati"
                                                  actionListener="#{bindings.setCurrentRowWithKeyValue.execute}"
                                                  disabled="#{row.GenResGrupa != 'true'}"/> 
    Please correct me! If you need further information, please let me know.

    Best regards, Debuger!

    Dear Debuger,

    Add in your pageDef:





    And in your jspx:
    Disabled = ' #{bindings. " GenResGrupa.inputValue! = 'true'} '.

    NOTE: no disabled = "#{row.bindings.GenResGrupa.inputValue! = 'true'} '"

  • Why my Time Machine backups do not take many hours?

    I recently changed my external backup of a disk in a big flash drive backup.  Some of the Time Machine backups take several hours, sometimes all night or more.  General info on Time Machine Prefs will show large backups, as now "backup 39.6 89.7 MB, with a remaining time" (the flash drive is only about a quarter of full.)  Is it normal for a backup of the USB?  Thank you.

    How the drive is formatted? It should be in Mac OS Extended journaled.

  • I'm trying to download the updates to my computer, but can't. I get the error code 646 and the download fails. I tried to download the update several times, but get the same answer. What is the problem?

    Ideas: I'm trying to download the updates to my computer, but can't. I get the error code 646 and the download fails. I tried to download the update several times, but get the same answer. What is the problem?

    • Pragrams you have problems with
    • Error messages
    • Recent changes to your computer
    • What you have already tried to solve the problem

    Remember - this is a public forum so never post private information such as numbers of mail or telephone!

    Hello

    Try this 1st to see if it helps, and it should:

    Description of the Patch registration cleanup tool
    http://support.Microsoft.com/kb/976220/

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

    If necessary :

    Try this - Panel - Windows Updates - on every update that will not be installed - click on the important updates
    or the update itself - double click a view more information (or click top then discovers on the right)

    Those who will take you to a page where you can download the update.

    Or go here and the KBxxxxxx number to download it.

    Download Center - mount the KBxxxxxx.

    Microsoft Download Center
    http://www.Microsoft.com/downloads/en/default.aspx

    Download - SAVE - go to where you put them - click on - RUN AS ADMIN

    Then you can right click on the update in the updates Windows and HIDE.

    If you get an error Installer install this version:

    Windows install 4.5 Redistributable
    http://www.Microsoft.com/downloads/details.aspx?FamilyId=5A58B56F-60B6-4412-95B9-54D056D6F9F4&displaylang=en

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

    Then run this:

    How to reset the Windows Update components? -a Mr Fixit
    http://support.Microsoft.com/kb/971058

    Description of the system for Windows Vista, Windows Server 2008, update tool and
    for Windows 7
    http://support.Microsoft.com/kb/947821

    ------------------------------------------------------------
    Because these are all Office updates you might get more information if necessary in the Agency of those groups that
    may have experienced the same problem.

    Office newsgroups
    http://www.Microsoft.com/Office/Community/en-us/FlyoutOverview.mspx

    Microsoft.public.office.misc discussions
    http://www.Microsoft.com/communities/newsgroups/list/en-us/default.aspx?DG=Microsoft.public.Office.misc&cat=en_us_01cb749f-c998-4762-8099-df71793c11c7&lang=en&CR=us

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

    If necessary you can incident free get reports however the above should take care of it for you.

    Windows updates - free Incident report

    Go here and click on-> Windows Update fails while searching, downloading or installation of updates
    http://support.Microsoft.com/GP/wusupport#tab3

    The security updates, you can get free support Incident report
    http://www.Microsoft.com/protect/resources/support.aspx

    I hope this helps.
    Rob - bicycle - Mark Twain said it is good.

  • Constant, failure to update, tried for several hours technical support help, recommended full could not uninstall and reinstall, install now freezes at 74%

    No, I'm really lost and I don't know what else to do and I'm not anxious to be on technical support for several hours again.

    My problem was originally that the hotfix update released last November failed to install. I ask on the forum for help, I got some good suggestions but nothing worked. Since Photoshop still worked I've just postponed the issue.

    Several months later, I decided to try everything I can to get the update to work. Created another Admin removed tried Photoshop by reinstalling. Still no. Tried several different things that do not work.

    I finally got with technical support, I allow access to my computer. They spent several hours uninstalling and reinstalling and not as I did. They did get more advances but after almost 4 hours, I was tired of looking at Photoshop do not settle.

    They said they have done all the troubleshooting that they could, and that the best option was to simply uninstall all Adobe and then reinstall it.

    I did tonight. Following the instructions here are using the Adobe Creative Cloud cleaning tool to solve installation problems

    Now I'm stuck with freezing to 74% on installation of Photoshop. Further research led me to this Adobe CC 2015 Direct Download Links: Creative Cloud 2015 Release | ProDesignTools

    Unfortunately, at the start of the installation, it cannot connect to the internet. I know that my connection is working because I can watch sites Web, but stops install on it. I try connecting later button and he asks a serial Code. I have CC so I is not a serial Code and may not try to generate a.

    If Photoshop used to work but not to update. Now it doesn't work at all.

    I'm desperate, I need help to solve this problem. Suggestions, ideas about why this is happening and what I can do to work around it? My number is 0187559333

    Finally managed to do work. I also tried the update and it worked also. It's been a long day.

    On the downloaded installation, there is an option to install a trial version or install a licensed version. The property stored fault due to the weird internet connection being found and the absence of an activation code. But the installation of the trial worked. Has exceeded the dreaded 74% and kept things.

    The end of installation, I opened creative cloud and looked at the applications tab. The update appeared later. I clicked top and too installed completely.

    Now I just hope the trial realizes that I have a legitimate CC account and that it does not lock me in the coming days.

  • I'm trying to update my ipad (first edition) to the new version and after about an hour, I get a message that says unable to finish because the network has expired.

    I'm trying to update my ipad (first edition) to the new version and after about an hour, I get a message that says unable to finish because the network has expired.  How can I fix it?

    Original title: network programs network networking Internet Web site Site Web Web Site URL

    Hello

    You need to support iPad not Microsoft.

    iPad - media choices
    http://www.Apple.com/support/

    iPad - Support
    http://www.Apple.com/support/iPad/

    iPad - communities (Forums)
    https://discussions.Apple.com/index.jspa

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

  • Well, after spending several hours of research and not coming up with solutions, I'm finally back to get "out there". My problems with iMovie 09-1 - import a picture in iPhoto 9.6.1 in an existing project in very small. All the appe

    Well, after spending several hours of research and not coming up with solutions, I'm finally back to get "out there". My problems with iMovie 09-

    1. import a picture in iPhoto 9.6.1 in an existing project in very small. Everything seems OK, picture looks that it imported, 4S etc but in fact there nothing there except a black screen, long 4 seconds. I tried all the suggestions in a dozen of discussions but nothing works.

    2 - by sliding the cursor (pointer) on clips in the project or the event of the flip backwards and return to normal once the cursor is removed. Clips of transfer of events to the project smoothly and are right side up.

    What can be done on the transfer of photos and clips reversal?

    Are you running at El Capitan?   He does not play well with versions of iMovie earlier than version 10.

    (Even in 10.1 some pictures with some computers may show a black in the viewer screen, although in this case there are solutions.)

    Geoff.

  • Aspire E1-572 takes ~ 1 hour for start to appear

    Dear members,

    My Aspire E1-572 suffers somewhat from the dreaded black screen of death.

    The computer needs an hour to start, but when finally, windows is loaded, it works like a charm.

    The "F2 for the bios screen" takes about an hour to load.

    I did a factory reset Acer.
    Tested the WD hard drive - no defects
    I ran memtest86 - no error

    I tried to update the bios of the Acer download section, but all I get is error.

    As I said, the computer works like a charm, only it takes about an hour for the start.

    Any suggestions?

    Hi guys,.

    Really strange, I think that the fact that the system takes an hour to start-up the BIOS or Windows means that it is something wrong with the motherboard. With the little information I have, I think the ROM chip used to store BIOS/UEFI (will) bad. Once you have loaded everything up, it is not necessary that would explain why Windows seems to work ok once you get in the operating system.

    I checked, 2.17 exists since almost 5 months with 10s of thousands of downloads. If there is a problem with the BIOS, you would have heard about it now. Also, nothing in our contact centres suggest abnormal failure due to this BIOS.

    My suggestion is to contact your service team and let's get resolved for you.

    Thank you
    Cory

  • BlackBerry Q10 after upgrade to 10.2.0.424 - battery recharging takes 24 hours and pay less than 2!

    I was surprised to see another post saying that the improved battery performance after the upgrade to 10.2.0.424...

    Two days ago, I have updated more wireless to the latest version 10.2.0.424 and since then:

    1 a battery takes 24 hours (and sometimes charges the same totally!),

    2. discharge takes a couple of hours,

    3 - battery heating more than before

    4 - blackbackground BBM that makes unreadable

    For reference - I had none of these problems before the upgrade, and I have not installed anything since

    Nobody witnessed this problem? How can I downgrade to the previous version?

    Thank you

    Try a few reboots. maybe also try - as I read on different post - press volume up and volume keys down simultaneously for 20 seconds (ignore his screenshot): he's going to perform a reboot too.

    After I had updated to 10.2 my battery was also drain more quickly (but not as yours), however a few reboots, complete a few refills and now it's even better than before.

  • Updated all the selected lines in a table.

    Hello

    Jdev Version 11.1.2.3.0

    I'm trying to update all the selected rows in a table with several choices.

            AppModuleImpl am = (AppModuleImpl)ADFUtils.getApplicationModuleForDataControl("AppModuleDataControl");
            ViewObject vo = am.findViewObject("RegistrationHistory1");
            RowKeySet selectedRegistrations = historyTable.getSelectedRowKeys();
    
    
            if (selectedRegistrations != null) {
                Iterator iter = selectedRegistrations.iterator();
                    while (iter.hasNext()) {
                        Object facesTreeRowKey = iter.next();
                        Row[] row = vo.findByKey((Key)((List)(facesTreeRowKey)).get(0), 1);
    
    
                        if (row != null && row.length == 1) {
                            Row r = row[0];
                             r.setAttribute("Attr", "1"); 
                        }
                    }
              }
    

    But after I put the attribute on the line. My iterator ignores most of the lines and they don't last updated.

    It works very well for the removal of the line well.

    Any suggestions?

    It turn out that I got a try catch and in the catch, I had a log (e.printStackTrace ()) and I do not see a single line in the diary saying ConcurrentModificationException appearing all the time.

    Looks for read-only access to an attribute or delete lines is OK to iterate over the selected lines, but it's different for the modification of an attribute.

    The code that worked:

    Links DCBindingContainer = (DCBindingContainer) BindingContext.getCurrent () .getCurrentBindingsEntry ();

    Entry DCIteratorBinding = bindings.findIteratorBinding ("RegistrationHistory1Iterator");

    RowSetIterator regRSiter = regIter.getRowSetIterator ();

    RowKeySet selectedRegistrations = historyTable.getSelectedRowKeys ();

    Object [] keys = selectedRegistrations.toArray ();

    for (Object key: keys) {}

    Line currentRow = regRSiter.getRow ((Key) ((List) key) .get (0));

    removeOrModify (currentRow);

    }

Maybe you are looking for