How fast an application update for 27 000 lines?

I used the following code from pl/sql using bulk collect to update a table called dwd_candidate_new. But it takes nearly 20 minutes to update record 27000. Is there a work around to make it faster?

Thank you.

declare

T_ServiceId. ARRAY TYPE IS VARCHAR2 (30);

T_Comments. ARRAY TYPE IS VARCHAR2 (30);

v_ServiceId t_ServiceId;

v_Comments t_Comments;

Start

Select s.c1, s.c4

COLLECTION in BULK IN v_ServiceId, v_Comments

of s dwd_report_stg

s.file_id = p_file_id;                   

FORALL indx IN v_Comments.FIRST... v_Comments.Last

UPDATE dwd_candidate_new

Set sdt_receive = sysdate,

sdt_comments = v_Comments (indx)

where service_id = v_ServiceId (indx);

end;

Why you use bulk collect and forall? If performance is a problem, I would start by trying to do this as a single SQL UPDATE or a MERGE statement. Make sure you have updated on tables and indexes statistics and see what the optimizer based on CSSTidy comes with.

Something like the following should work (untested so please excuse the mistakes of syntax)

MERGE INTO dwd_candidate_new tgt
USING (
SELECT c1, c4
FROM dwd_report_stg
WHERE file_id = p_file_id
) src
ON (src.c1 = tgt.service_id)
WHEN MATCHED THEN
UPDATE SET tgt.sdt_receive=sysdate, tgt.sdt_comments = src.c4;

In addition, there are a few mistakes in your PL/SQL - there seems to be a keyword WHERE in the SELECT statement, and the variable p_file_id is undeclared.

It would be useful if you could create post instructions, sample data and code of work table.

Hope that helps

Dan

Tags: Database

Similar Questions

  • How to make an update for camera RAW ARW (sony)?

    How to make an update for camera RAW ARW (sony)?

    General answer in this faq:

    FAQ: Photoshop Elements will work with my camera, or why does not open my raw files?

    For more information, please indicate the camera model and your version of elements.

  • How can I download updates for CS5 Extended when I get the error message "this serial number is not for a product calling it"?

    How can I download updates for CS5 Extended when I get the error message "this serial number is not for a product calling it"?

    Updates are not related to series numbers, so you must have done something compared to try to use an upgrade rather than an update.  Adobe not revise older versions of their software to adapt to the latest hardware/devices.  They create/sell new versions of their software for it.  If you subscribe to the Cloud at some point you shouldn't have a problem with the software becomes obsolete.

  • How can I remove updates for Windows Vista? Duplicates are KB976325, KB973917, KB974318. The system still wants to install updates and just duplicates on again once. First update list has 20, second and third about 18.

    Duplication did not begin until I tried to load the list of updates.  Continues to tell me the same updates are available and download them if allowed.  Only the update that has been update group above that does not DOWNLOAD is Internet Explorer 8 for Windows Vista, which I am downloading now. When I go to 'historic day' to remove duplicates as indicated in the instructions for help. duplicates above are not listed. Of the; folding situation is on a Gateway laptop.  I am writing this issue on my Gateway PC.

    LiveUpdate install updates for your Symantec/Norton application only.

    Don't worry what you see in the installed updates or unable to uninstall the 3 updates, simply 'hide' and move.

    1. stop the automatic updates service:

    Start > Right click on run , and then select run as administrator > services.msc (type) > [OK]
    Double-click automatic updates > click stop
    (Stopping the service will take a moment)

    2 remove the contents of the download folder:

    Start > Right click on run , and then select run as administrator >
    (type or copy/paste) %windir%\SoftwareDistribution > [OK]
    Open the download folder and delete its content
    Close the window.

    3 start | Control Panel | System maintenance and (if you use Classic view, skip this step). Windows Update |  View the updates available (or Select the updates installed): right-click on KB976325 KB973917 and KB974318, in turn. Click hide update | Confirm the prompt UAC (User Account Control), if any, & OK your way out.

    4. start the automatic updates service:

    Start > Right click on run , and then select run as administrator > services.msc (type) > [OK]
    Double-click automatic updates > click Start
    (Stopping the service will take a moment)

    =====================================
    To restore/show updates for Vista: Start | Control Panel | System maintenance and (if you use Classic view, skip this step) | Windows Update | Restore hidden updates: Find and select the update you want to install. Click restore. You can now select once again it and install through the normal process.

    ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

  • How to prevent the updates for Office Standard 2007

    I'm running on windows xp. I use office 2007 standard. After a computer breakdown recent when I reinstalled office 2007 standard I am able to update 2003 documents. However, after sending updates by microsoft I can't open word 2003 documents. It says I need a converter. When I go to the microsoft site and download as advised that it downloads but still do not allow me to open the 2003 docs. I just want to be able to disable updates for office 2007 standard. that will solve my problem. can someone tell me how to proceed?

    Thank you

    Hi Mary,

    I suggest you to check the number of KB updates to isolate the problem.

    To see the updates are installed on the computer, follow these steps:

    a. click Start, click all programsand then click Windows Update or Microsoft Update.

    b. click view update history. A window opens that displays all the updates that are installed and those who have not installed properly on the computer.

    You can perform the System Restore before you install the Windows updates and check.

    Important: System Restore will return all your files non-system as documents, email, music, etc., to a previous state. These files of types are completely affected by the restoration of the system. If it was your intention with this tool to recover a deleted file to non-system, try using a file instead of system restore recovery program.

    You can Configure Windows to install only specific updates.  Check out the link for more information.

    http://support.Microsoft.com/kb/901037

    For any question related to Office documents, I suggest you please post your query in Office and Outlook Forums for assistance.

    http://answers.Microsoft.com/en-us/Office/forums/Outlook

    Please post back with the State of the question, so that we can help you further.

  • How to install the update for CAPICOM (KB931906) Security Version 2.1.0.2

    original title: implementation of security update for CAPICOM (KB931906) Version 2.1.0.2

    How can I take care of this update for CAPICOM (KB931906) security Publisher Version 2.1.0.2 Http//support_microsoft.com?Kbid=931906

    Hi FOTISmaheras,
     
    -What exactly is the problem you are having? Are you unable to install this update?
    -If Yes, are the other updates complete the installation successfully without any problem?
     
    CAPICOM is a component of Windows that provides services to programs that allow cryptography-based security. This includes the features of authentication which uses digital signatures for enveloping messages and to encrypt and decrypt data.

    Note This update requires Microsoft Windows Installer version 3.0 or a later version of Windows Installer.

     
    For more information, click on the number below to view the article in the Microsoft Knowledge Base:
    292539 How to obtain the Windows Installer engine
     
     
    Download the stand-alone update package and install it manually.
  • How to get an update for Gigabyte 77TA-UD 3/F2

    Original title: Bios updates

    Can someone advise me how to get an update if there is one for: Gigabyte 77TA-UD 3 / F2

    Hello

    This isn't a correct model number.

    Maybe it's on this list.

    http://www.gigabyte.com/support-Downloads/Download-Center.aspx?kW=77&CK

    I hope this helps.

    Rob Brown - MS MVP - Windows Desktop Experience: Bike - Mark Twain said it right.

  • unusual warm-up and drainage of battery fast after the update for sierra

    everyone knows unusual warm up their MacBook pro and the draining of battery faster after the update to Mac OS sierra?

    my MacBook 2015 mid pro gets hot when I close the screen and put it to sleep, as well as drainage of battery faster than usual. everyone knows the same?

    Try to use the activity monitor to see where will your battery life.

    1. go to the docking station
    2. Click on finder
    3. Click the menu go
    4. Choose utility
    5. Double-click activity monitor
    6. Click the stack tab

    See you using your battery?

  • Qosmio G20 - how to find an update for the video card?

    Hi I can't find the update for the video card and when I run the game it hand me your video card drivers are too old.update them.
    my laptop:(toshiba Qosmio G20)
    My vidoe card: (NVIDIA GeForce Go 6600)
    Operating system: (Microsoft Windows XP Professional)

    Hey,.

    To be honest I don t understand your problem. Why visit nVidia?

    All you can download it from the download page of European driver from Toshiba as a boarder suggested. I even checked this and for Qosmio G20 and Windows XP you can get all the drivers no problem at all! :)

  • How can I download update for Vista, KB971644 platform?

    The links Live Mail and Live Essentials, tell me that I need to SP2 and the update of the platform before download Live Mail.  I have SP2 (or so the download history tells me) and the link for update of said platform open Windows update, click 'updates' and choose the update KB971644 platform.  This update is not on the list of available updates and does not appear as having been downloaded history.  So, what to do?

    Hi Ray,

    The discussion below has many suggestions for the same update. Please go through it and see if it's all about him.

    KB971644 platform update for Windows Vista (SP2) _
    http://social.answers.Microsoft.com/forums/en/vistawu/thread/8857d093-144B-4dc6-84e4-9a5ecc79bd8c

    Kind regards

    Shinmila H - Microsoft Support

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How to remove downloaded updates for Windows 7

    How can I delete downloaded updates of Windows 7?  While the updates are being downloaded, apparently I lost my internet connection then maybe that these were not completely downloaded. When I was prompted to install the updates, I did.  During the stop, the computer only installed15% and then stop.  I am now invited that updates were not properly installed.  I have updated manually several times over with the same results.  Should I delete the old downloaded updates and start again?  If so, how do remove these updates downloaded so I start again.  Thank you.

    JTF42,

    See if anything here helps

    How TO remove an update

    http://Windows.Microsoft.com/en-us/Windows-Vista/remove-an-update

    04/30 / 1104:20: 45 pm

  • How to fix sucurity update for Windows xp (kb263317) NE WILL NOT TURN to DAY

    MY SUCURITY UPDATES WILL NOT UPDATE SECURITY UPDATE FOR WINDOWS XP (KB263317) PROBLEM. Help.

    This thread may be interesting:

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_xp-windows_update/update-failure-kb263371-error-code-800700008/a70eb05a-1f49-4A64-9C4C-302bb622a95c

  • How can I get updates for IDE ATA / ATAPI Controller for windows xp pro

    Where can I find drivers updates for IDE ATA / ATAPI Controllers for windows xp pro?

    These are usually Microsoft drivers, and they are as old as the hills, why do you need to update the drivers?  If the Microsoft drivers are not appropriate, then get the drivers from the manufacturer of the motherboard.

    John

  • How to reset us updated for XP windows components?

    I can't reset the components of windows XP update to load the SP3. I found for Vista on the Microsoft Web site. The fact of any assistance with the exact link or the detailed steps for XP OS.

    "this fixit does not apply to your system or XP! So, I am struck with the installation of the SP3 of XP...

    Sorry if I am troubling with my messages... I hope that I will find a quick solution. Thank you for the information again... :)

    http://Windows.Microsoft.com/en-us/Windows/help/learn-how-to-install-Windows-XP-Service-Pack-3-SP3

    There's no SP3 for the 64 bit version of Windows XP. If you run the 64-bit version of Windows XP with Service Pack 2, you have the latest service pack and continue to be eligible for support and receive updates until April 8, 2014. To find out which version you are using, see my computer run the 32-bit version or 64-bit Windows?

    Have you tried to manually reset the components Windows Updates?

    Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:

    322756 (http://support.microsoft.com/kb/322756/) how to back up and restore the registry in Windows

    To reset the Windows Update components, follow these steps:

    1. Open a Windows command prompt. To open a command prompt, click Start, then click Run. Copy and paste (or type) the following command in the Open box, and then press ENTER: cmd
    2. Stop the BITS service and the Windows Update service. To do this, type the following commands at a command prompt. Press ENTER after you type each command.
      • net stop bits
      • net stop wuauserv
    3. Delete the qmgr*.dat files. To do this, type the following command at a command prompt and press ENTER:
      Del "%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\qmgr*.dat.
    4. If this is your first attempt to troubleshoot Windows Update by following the steps in this article, go to step 5 without performing the steps described in step 4. The steps in step 4 must be performed only at the time the Troubleshooting If you cannot resolve your Windows Update problems after following all the steps but step 4. The steps in step 4 are also carried out by the "aggressive" mode of the fix it Solution above:
      1. Rename the following files to *. BAK:

        • %SystemRoot%\SoftwareDistribution\DataStore
        • %SystemRoot%\SoftwareDistribution\Download
        • %Systemroot%\System32\Catroot2

        To do this, type the following commands at a command prompt. Press ENTER after you type each command.

    • Ren %systemroot%\SoftwareDistribution\DataStore master
    • Ren %systemroot%\SoftwareDistribution\Download master
    • Ren %systemroot%\system32\catroot2 master
  • Reset the BITS service and the Windows Update service for the default security descriptor. To do this, type the following commands at a command prompt. Press ENTER after you type each command.
    • SC.exe tisb strands D: (A; CCLCSWRPWPDTLOCRRC; SELLERS) (A; CCDCLCSWRPWPDTLOCRSDRCWDWO; (BA) (A; CCLCSWLOCRRC; AU) (A; CCLCSWRPWPDTLOCRRC; CENTRAL UNIT)
    • SC.exe tisb wuauserv D: (A; CCLCSWRPWPDTLOCRRC; SELLERS) (A; CCDCLCSWRPWPDTLOCRSDRCWDWO; (BA) (A; CCLCSWLOCRRC; AU) (A; CCLCSWRPWPDTLOCRRC; CENTRAL UNIT)
  • Type the following command at a command prompt and press ENTER:
    CD /d %windir%\system32
  • Reregister the BITS files and Windows Update files. To do this, type the following commands at a command prompt. Press ENTER after you type each command.
    • Regsvr32.exe atl.dll
    • Regsvr32.exe urlmon.dll
    • Regsvr32.exe mshtml.dll
    • Regsvr32.exe shdocvw.dll
    • Regsvr32.exe browseui.dll
    • Regsvr32.exe jscript.dll
    • Regsvr32.exe vbscript.dll
    • Regsvr32.exe scrrun.dll
    • Regsvr32.exe msxml.dll
    • Regsvr32.exe msxml3.dll
    • Regsvr32.exe msxml6.dll
    • Regsvr32.exe actxprxy.dll
    • Regsvr32.exe softpub.dll
    • Regsvr32.exe wintrust.dll
    • Regsvr32.exe dssenh.dll
    • Regsvr32.exe rsaenh.dll
    • Regsvr32.exe gpkcsp.dll
    • Regsvr32.exe sccbase.dll
    • Regsvr32.exe slbcsp.dll
    • Regsvr32.exe cryptdlg.dll
    • Regsvr32.exe oleaut32.dll
    • Regsvr32.exe ole32.dll
    • Regsvr32.exe shell32.dll
    • Regsvr32.exe initpki.dll
    • Regsvr32.exe c:\windows\system32\wuapi.dll
    • Regsvr32.exe c:\windows\system32\wuaueng.dll
    • Regsvr32.exe wuaueng1.dll
    • Regsvr32.exe c:\windows\system32\dllcache\wucltui.dll
    • Regsvr32.exe c:\windows\system32\wups.dll
    • Regsvr32.exe wups2.dll
    • Regsvr32.exe wuweb.dll
    • Regsvr32.exe qmgr.dll
    • Regsvr32.exe qmgrprxy.dll
    • Regsvr32.exe c:\windows\system32\wucltux.dll
    • Regsvr32.exe c:\windows\system32\muweb.dll
    • Regsvr32.exe c:\windows\system32\wuwebv.dll
  • Reset Winsock. To do this, type the following command at a command prompt and press ENTER:
    netsh winsock reset
  • If you are running Windows XP or Windows Server 2003, you must set the proxy settings. To do this, type the following command at a command prompt and press ENTER:
    Proxycfg.exe d
  • Restart the BITS service and the Windows Update service. To do this, type the following commands at a command prompt. Press ENTER after you type each command.
    • net start bits
    • net start wuauserv
  • If you are running Windows Vista or Windows Server 2008, erase the BITS queue. To do this, type the following command at a command prompt and press ENTER:
    Bitsadmin.exe/Reset /allusers
  • Install the latest Windows Update Agent
  • . For more information, click on the number below to view the article in the Microsoft Knowledge Base:
    949104 (http://support.microsoft.com/kb/949104/) how to obtain the latest version of the Windows Update Agent to help manage updates on a computer
  • Restart the computer.
  • A place to get FREE assistance for the installation of SP3 issues * Microsoft *...

    http://support.Microsoft.com/OAS/default.aspx?ln=en-us&PRID=11273&Gprid=522131>

    WinXP SP3 - read all the prerequisites for a successful installation

    http://msmvps.com/blogs/harrywaldron/archive/2008/05/08/Windows-XP-SP3-read-all-prerequisites-for-a-successful-installation.aspx>

    Steps to take before you install Windows XP Service Pack 3

    http://support.Microsoft.com/kb/950717>

    Suggestions:

    (1) download the full installation of SP3 file and burn the ISO download on CD.

    (2) ensure (as is likely) you don't have any spyware/malware by doing a full scan with SuperAntiSpyware and MalwareBytes.

    (3) CHKDSK

    (4) defragment

    (5) make sure that your drivers are up-to-date (from respective web pages of the hardware manufacturer.)

    (6) restart the right before you try to install SP3.

    7) disconnect from the internet before installing (physically).

    (8) disable your antivirus and software anti spyware applications when you are about to install SP3.

    Some (if not all) which is covered in the links above.

    UTC/GMT is 23:59 on Thursday, September 15, 2011

    Jose Antonio Ponton Posada CEO

  • How can I get updates for work? I get an error 2.

    Whenever I turn my computer on it tries to update cloud creative but still stops at 2% and says unable to connect to the server or something similar. How manually update creative cloud? Or what can I do for it can be automatically updated in the game?

    Jeff,

    If you receive error Code 2 when installing the desktop creative cloud application, please run uninstall creative cloud desktop application.

    Please see this link for more details:Error Code 2 has no Creative Cloud Desktop app update

    Guinot

Maybe you are looking for