Fired and for all costs in bulk

Hi all

I need to get 500000 lines of a table and apply logic to each line and insert the result into another table.
Currently, I'm trying with COLLECT in BULK. To improve performance there is any other alternative...
Can we improve as well as BULK collect. Please suggest with examples...

Thank you and best regards,
Sri

user12023859 wrote:
As suggested by you, I deleted all select them iteration in bulk and I could see the performance improvement. I always use PL/SQL to convert line values to the values of columns. I get my cursor to input data in the rows.

You are still doing a nested SELECT statement (just now through explicit cursors).

Extract a line of account, and then you open a cursor (SQL) for the balance and then treat that. You do exactly what does the SQL engine in a nested loops join. Only, your code can never be as fast and efficient as the SQL engine in this regard.

Which begs the question: why manually join accounts whose balances using PL/SQL code? Why don't you use SQL to join the two tables instead?

All of the PL/SQL code must be replaced by the following SQL statement:

insert into balance_due
select
   .. SQL logic using CASE statements...
from cmf,
     balances,
     cost_centres
where ..predicates..

And then this code will be used in PL/SQL and followed by a validation. That's all. Simple, effective, fast and scalable code.

You must optimize SQL and PL/SQL to minimize for performance. SQL is superior than PL/SQL, when it comes to crunch data. Use only PL/SQL to deal with flow control process, under condition of logical flow and so on - SQL allows to process the data.

Pulling data from the SQL engine in the PL engine (despite that collect the essential) is still of the line treatment... treatment aka slow-by-slow.

SQL is a language very powerful and able to process the data from the database. PL is not.

Tags: Database

Similar Questions

  • Exception handlers in bulk collect and for all operations?

    Hello world

    My version of DB is

    BANNER

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

    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi

    PL/SQL Release 10.2.0.1.0 - Production

    CORE 10.2.0.1.0 Production

    AMT for Linux: Version 10.2.0.1.0 - Production

    NLSRTL Version 10.2.0.1.0 - Production

    My question is, what are the possible exception handlers can add us in a bulk collect and for all operations?

    When we use for all, we add except exception and sql % bulk_exceptions. But apart from that what can we add to bulk collect?

    Kind regards

    BS2012.

    Save stores Exception all the exceptions that occur during in bulk in a collection of treatment and at the end of the most much treatment raises an exception. The SQL % BULK_EXCEPTIONS collection has all exceptions. It's the right way to handle the exception during treatment in bulk. And that's all you need. Don't know what else await you.

  • How to stop Firefox blocking Flash once and for all?

    I have the latest version of Adobe Flash and Firefox insists on constantly to block it.
    I tried the thermostat settings in advance however that they do not make the choice to stop it completely.

    I don't want to switch browsers, but the East is frustrating.
    Thank you for all the solutions.

    Adobe has released an update today to solve critical problems, he admitted were in the 18.0.0.203 version. You can get 18.0.0.209 on this page:

    https://www.Adobe.com/products/flashplayer/distribution3.html

    No one can promise that this kind of block will never happen. If that happens, if you are not accustomed to using the "Request to activate" feature a plugin, here's what to expect:

    When you visit a site that wants to use the Flash, you should see a notification in the address bar icon and one of the following: a link in a black rectangle in the page or an information bar slides between the toolbar and in the page area.

    If you see a good reason to use Flash, and the site looks trustworthy, you can go ahead and click on the Lego-like icon in the address bar to allow Flash. You can trust the site for the time being or permanently.

    But some pages use Flash only for tracking or play ads, so if you do not see an immediate need for Flash, feel free to ignore the notification! It will just sit there in case you later want.

  • How to mozilla.cfg, override.ini, all - companyname.js, work once and for all for all users files

    I'm trying to apply a patch for the browser firefox (version 23.0.1) on more than 250 computers. Setting default Web pages, disable the annoying guests as the default browser and import bookmarks and deleting history on shutdown or startup. It is very easily done editing the pref.js file, but I will not change this file, it is out of the question. Another update of FF will erase or overwrite all my changes.

    I run a computer lab at the University which is locked with a Net Support School console. You don't need to find out who. Virtually all Web sites are limited except those ones I list white. The Web sites we use have an extensive API for JS, CSS, Java, PHP, etc... We use technology so that students use calculators graphics, video, and the module test socket of the Whitelist, as Pearson or Aleks sites. Now, with that said, cookies and stored profile history become a problem, and on up to day 25% of students using computers need history deleted for a loading page. I think I solved this problem permanently by whitelist backend sites import plugins and API etc, I found the console developers. No matter what. What I learned from all this, is that Firefox can be very customizable, using the '...\Mozilla Firefox\mozilla.cfg' and '...\Mozilla Firefox\defaults\prefs\all-companyname.js' (or custom.js) the problem is little matter what I try I can't seem to work. Was the closest I have got here:

    http://www.intrntpirate.com/?p=615

    Here again, even that ^^ did not work. I followed these instructions to a "T". What is the problem with the explanations above in the link? Why firefox doing harder and harder for us to optimize it for massive deployments through a company and a University? I won't do any fancy hacks to avoid the main problem. I need mozilla.cfg and all - companyname.js and override.ini files to work, if and only if they are still topical.

    Here's what my files look like so far:

    name: all - lmc.js

    location: C:\Program Files (x 86) \Mozilla Firefox\defaults\pref\

    Pref ("general.config.filename", "mozilla.cfg");

    Pref ("browser.startup.homepage", "https://(some url)");

    name: override.ini

    location: C:\Program Files (x 86) \Mozilla Firefox\

    [XRE]

    EnableProfileMigrator = false



    name: mozilla.cfg

    location: C:\Program Files (x 86) \Mozilla Firefox\

    //

    lockPref ("privacy.sanitize.sanitizeOnShutdown", true);

    lockPref ("privacy.sanitize.promptOnSanitize", false);

    lockPref ("browser.shell.checkDefaultBrowser", false);

    lockPref ("toolkit.telemetry.enabled", false);

    lockPref ("toolkit.telemetry.prompted", 2);

    lockPref ("toolkit.telemetry.rejected", true);

    I tried using it or not, the Configurator automatic mozilla. I tried to change lockPref pref. Nothing works. Not the override.ini, not at all - lmc.js and not the mozilla.cfg. I lost hours of reading through the blogs of experts telling us to change files that do not exist, or beat around the Bush. I did the search. If you have the answer, or you want to help me understand this just remember to keep it simple. Please, I beg you. In the end, I want to pack all the config files, with one how, in a zip on our shared drive folder. To have FF on measure and ready to deploy on different services on the campus.

    Error console warnings are OK.

    The general.config.obscure_value pref is set to the default of 0?

    You can try to save these versions of the files (open in a Firefox tab and save via Save Page As)

    I don't know if all these prefs are still supported in the current version of Firefox.

    local - settings.js

    data:text/plain;charset=utf-8;base64,cHJlZigiZ2VuZXJhbC5jb25maWcuZmlsZW5hbWUiLCAibW96aWxsYS5jZmciKTsKcHJlZigiZ2VuZXJhbC5jb25maWcub2JzY3VyZV92YWx1ZSIsIDApOwo=
    

    Mozilla.cfg

    data:text/plain;charset=utf-8;base64,Ly8KcHJlZigicHJpdmFjeS5zYW5pdGl6ZS5zYW5pdGl6ZU9uU2h1dGRvd24iLCB0cnVlKTsKcHJlZigicHJpdmFjeS5zYW5pdGl6ZS5wcm9tcHRPblNhbml0aXplIiwgZmFsc2UpOwpwcmVmKCJicm93c2VyLnJpZ2h0cy5vdmVycmlkZSIsIHRydWUpOwpwcmVmKCJhcHAudXBkYXRlLmF1dG8iLCBmYWxzZSk7CnByZWYoImV4dGVuc2lvbnMuYmxvY2tsaXN0LmVuYWJsZWQiLCBmYWxzZSk7CnByZWYoImV4dGVuc2lvbnMuc2hvd25TZWxlY3Rpb25VSSIsIHRydWUpOwpwcmVmKCJicm93c2VyLnNoZWxsLmNoZWNrRGVmYXVsdEJyb3dzZXIiLCBmYWxzZSk7CnByZWYoInRvb2xraXQudGVsZW1ldHJ5LmVuYWJsZWQiLCBmYWxzZSk7CnByZWYoInRvb2xraXQudGVsZW1ldHJ5LnByb21wdGVkIiwgMik7CnByZWYoInRvb2xraXQudGVsZW1ldHJ5LnJlamVjdGVkIiwgdHJ1ZSk7CnByZWYoImFwcC51cGRhdGUuYXV0byIsIGZhbHNlKTsKcHJlZigiYnJvd3Nlci5kb3dubG9hZC51c2VEb3dubG9hZERpciIsIHRydWUpOwpwcmVmKCJicm93c2VyLnNlYXJjaC51cGRhdGUiLCBmYWxzZSk7CnByZWYoInNpZ25vbi5hdXRvZmlsbEZvcm1zIiwgZmFsc2UpOwpwcmVmKCJzaWdub24ucmVtZW1iZXJTaWdub25zIiwgZmFsc2UpOwpwcmVmKCJicm93c2VyLmRvd25sb2FkLm1hbmFnZXIuc2NhbldoZW5Eb25lIiwgdHJ1ZSk7CnByZWYoImJyb3dzZXIuZm9ybWZpbGwuZW5hYmxlIiwgZmFsc2UpOwpwcmVmKCJ4cGluc3RhbGwuZW5hYmxlZCIsIHRydWUpOwo=
  • cleaning registry, fixing graphics driver crashes once and for all

    Hi, well I had no "graphic driver stopped working" until I updated my card to a 260 to 275 and since then, have implemented multiple of 275 and a 285.   Well, I get the nvlddmkm problem all the time now

    AND
    When I look in the REGISTRY, underHKEY LOCAL MACHINE / SYSTEM / CURRENTCONTROLSET / CONTROL / VIDEO, as long as the video is stored, THERE EXIST SEVERAL entries/code/files of 275 and 285.  and stored with each a nvlddmkm...
    So I want to erase my registry and don't have the entrance of a folder containing a nvlddmkm by card I installed and eliminate redundancies in the register as a source of nvlddmkm
    Thank you

    I was suggesting that you uninstall any nvidia first (leave your single chipset for now - I know not that you can actually uninstall), restart, make sure that Windows update does not run, run ccleaner, reboot again, and then reinstall the required stuff nvidia directly from the NVidia site.

    You uninstall your chipset drivers, you can only update and maybe re-install them using what I understand (http://www.pcguide.com/vb/showthread.php?t=20094). I'm not positive if the chipset drivers are included in NVidia driver packages or not because I got ATI cards up to this point. So, basically, I let your chipset alone for now and just uninstall your graphics driver and go from there.

    Good luck.

  • I have a rootkit virus passes on a level that I don't see with unix-like software. How can I get rid of this one once and for all?

    We are entering battles if I try to maintain security by traditional means, but they have quite me. Setting up of the files using the highest levels of security and this has greatly affected my ability to work, even though I know they all have my account numbers, SS, anniversary, license etc. You have to find a security specialist, and if so how can I go about it?

    Hi Tomrees,

    ·         What type of virus from your computer is infected by?

    ·         What security software is installed on your computer?

    ·         You receive an error message or error code?

    ·         Did you do changes on the computer before the show?

    I suggest you scan your computer with the Microsoft Security Scanner, which would help us to get rid of viruses, spyware and other malicious software.

    The Microsoft Security Scanner is a downloadable security tool for free which allows analysis at the application and helps remove viruses, spyware and other malware. It works with your current antivirus software.

    http://www.Microsoft.com/security/scanner/en-us/default.aspx

     

    Note: The Microsoft Safety Scanner ends 10 days after being downloaded. To restart a scan with the latest definitions of anti-malware, download and run the Microsoft Safety Scanner again.

    Important: While hard disk analysis if bad sectors are found when scanning try to repair this area, all available on which data can be lost.

    I hope this helps.

  • DEP, Data Execution Prevention... How can I git RID once and for all of this thing... I have to use my Apple of girls to enter businesses that I use for my work... Please how to remove this monster DEP! Help

    When I go on almost all websites that I am stuck with DEP, Data Execution Prevention... are safe sites that I use for my business! I have to use my Appleto girls don't half of my work because I can't figure out how to rid my computer of this virus DEP! Help, it's a hinderence!

    Hello

    EricLaw IEInternals - a peek at Internet Explorer from inside. -Understanding DEP/NX
    http://blogs.msdn.com/ieinternals/archive/2009/10/10/understanding-data-execution-prevention-crashes-in-IE8.aspx

    The problem might actually be an addon or another program causing the problem and you
    must verify that 1.

    What antivirus/antispyware/security products do you have on the machine? Be one you have
    EVER had on this machine, including those you have uninstalled (they leave leftovers behind which)
    may cause strange problems).

    Start - all programs - Accessores - system tools - IE with no Addons - does this work better?

    IE - Tools - Internet Options - Advanced - tab click on restore, and then click Reset - apply / OK

    IE - Tools - Internet Options - Security - reset all Zones by default level - apply / OK

    not better?

    Close IE and try again IE or IE with no Addons

    IE - tools - manage Addons (for sure disable SSV2 if she's here, is no longer necessary, but)
    Java always install it and it causes problems - you never update Java to go back in and turn it off again.)
    Search for other possible problems.

    Windows Defender - tools - software explore - look for problems with programs that do not look
    right. Allowed are usually OK and "unauthorized" are not always bad. If a doubt
    program to ask about it here.

    Could be a free - BHOremover - BHO - standalone program, needs no installation, download and
    run - not all are bad but some can cause your question. (Toolbars are BHO)
    http://securityxploded.com/bhoremover.php

    Startup programs
    http://www.Vistax64.com/tutorials/79612-startup-programs-enable-disable.html

    Also get Malwarebytes - free - use as scanner only. If you ever think malware and which would be
    stands with Prevx running except for a cookie of occasional low level (not a big deal), the update
    and then execute it as a scanner.

    http://www.Malwarebytes.org/

    I would add prevx so.

    Prevx - home - free small, fast, exceptional protection CLOUD, working with other security
    programs. It is a single scanner, VERY EFFICIENT, if it finds something come back here
    or use Google to see how to remove.
    http://www.prevx.com/

    PCmag - Prevx - Editor's choice
    http://www.PCMag.com/Article2/0, 2817,2346862,00.asp

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

    Do yourself a big favor and work through 1 above.

    Data execution prevention Internet Explorer Windows 7 included - several methods here difficult
    http://HubPages.com/hub/data-execution-prevention-Internet-Explorer

    Feature Data Execution Prevention, or DEP in Windows Vista & Windows 7 - see also the links to the
    at the bottom of this page.
    http://www.WinVistaClub.com/F33.html

    How control DEP but I don't recommend turning it off and certainly not to let power off.

    How to enable DEP on or off for a program of Vista (and Windows 7)
    http://www.Vistax64.com/tutorials/65790-DEP-turn-off-programs.html

    How to enable or disable DEP in Vista (and Windows 7)
    http://www.Vistax64.com/tutorials/120778-DEP-enable-disable.html

    ====================================

    If nothing else works you can try this however I would use as a last resort.

    IE - Tools - Options - Advanced Options - Internet Security Section - clear the check box enable memory
    Protection to mitigate the attacks online - APPLY - OK close and restart IE

    I hope this helps.

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

  • Is it possible to buy the creative cloud adobe once and for all, or only the subscription is available?

    Hello all, please help me with this question: I would like to buy creativity could not a year or a month for my entire life I guess, so is it possible or not? I had different opinions of my friends, please give me an official response :) Thank you in advance for help you!

    CC is a subscription model and your friends are wrong. There is no such thing as a "buy once, use forever" of CC.

    Mylenium

  • I AI REMOVED THE BABYLON ENGINE/bar TOOLS YET IT IS ALWAYS running AS MY SEARCH ENGINE SEARCH, HOW can I REMOVE IT ONCE AND FOR ALL?

    I uninstalled this for my computer and also uninstalled Babylon form Firefox but it still works as my search engine. Any ideas on how to rid my computer it?

    Hi Michel,.

    You should take a look at the following threads:

    Hope this helps!

  • Can I download once and for all, to the 2nd machine?

    I just bought a subscription to the CC and been download applications through creative cloud. Now, I want some apps on my 2nd machine. Tell me yes I have downloaded and installed Adobe first CC on 1st machine. Due to the internet connection snail, I am faced with challenges by downloading again. Is there anywhere I can grab the 1st machine and install right away on the 2nd?

    Also, under my profile account manage > products, there is nothing even after that I downloaded and installed several applications. Is this normal? I thought 'Products' in the present, all applications that I installed.

    Hi ShunMing,

    The download and installation process is the same.

    You will not be able to use the application if you try to transfer 1 machine to another.

    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

  • ENVY: NO LOW AGAIN! PLEASE SOLVE THIS PROBLEM ONCE AND FOR ALL!

    I keep having the same problem n BASS and it drives me CRAZY!  It seems that this problem would have been fixed by now in the updates.  I got 8.1 and had to fix before, now that I've upgraded to Windows 10 it happens again.  I'm trying to run a recording studio and I can't believe I'm still dealing with this problem, I'm LOSING MONEY AND CUSTOMERS by REASON OF THIS!  In particular, you would think that a "Beat Audio" machine would have BASS!  Help, please!  Thanks in advance!

    Hello:

    The only suggestion I can offer is to try this W10 IDT audio driver and restart the PC.

    This package contains the driver that allows Audio IDT high definition (HD) in the notebook models that are running a supported operating system.

    File name: sp63555.exe

  • HP Deskjet Ink Advantage 1515: stop the test page printed for all-in-one printer, HP Deskjet Ink Advantage 1515

    How can I stop my HP Deskjet Ink Advantage 1515 all-in-One printer to print a test page everytime I STARTED printing?

    Hello JoshSimon ,

    Welcome to the HP Forums.

    I see that you have a problem with the printer printing before you print a test page.

    If you turn off the printer at the end of the day, please do not.  Turn the printer on/off will result in printing a test page.  If you are concerned about the printer lost power, and that's why you stop, the unit actually built in sleep/stand mode that will kick in when you are not using the printer.

    Once a print job is sent to the printer it then wake up and do the task at hand.

    In addition, make sure you have the printer power cable connected directly to a wall outlet and not a bar/power strip. Here is a document that uses a LaserJet printer for example, but it is intended for HP products in general. Please click the link which explains the problems when connected to an uninterruptible power supply/Strip/surge protector power.

    If troubleshooting doesn't help not solve your problem, then I would say call the HP Technical Support to see all the other possibilities for you. If you call in North America, the number is 1-800-474-6836 and for all other regions, please click here: click here.

    See you soon,.

  • Once for all - please

    Hi all

    I used CF for several years now and bought Flex as soon as he was released. In my process to understand how Flex manipulated remote objects for CF, I decided to use the Assistant Creation of CF for Flex that creates all kinds of beautiful CFCS and other things to connect to a database and the CRUD data inside. OK all well and dandy on the local machine, works very well, I'm impressed! This is until I try to download the application for my shared server (HMS) and I get all sorts of error messages as cryptic:

    error ID (mx:rpc:Fault) #0 = 0
    faultCode = "Client.Error.MessageSend"
    faultDetail = "Channel.Connect.Failed error."
    NetConnection.Call.Failed: HTTP:Status 500 "
    faultString = "send failed".
    message = "faultCode.Client.Error.MessageSend faultString:"Send Failed '"
    error faultDetail:'Channel.Connect.Failed
    NetConnection.CallFailed: HTTP: status 500 "name ="Error ".
    rootCause = (Object) #1
    code = NetConnection.Call.Failed.
    Description = "HTTP: status 500".
    Details = "' http://www.MYDOMIAN.com/flex2gateway/ ' level ="error""

    So I read the DOCs and read all the blogs I can find on the subject, but nobody can give a clear answer as to why I can't do this job on a shared server if I can make it work on my local machine, hell, I can even tap into the MySQL database on the server shared via Flex builder. I use HostMySite.com with CF package if that helps.

    If it's just a matter of something on my end to host that I need them to set up for me it would be nice to know, or if I simply can't use Flex and CF together on a server all shared together. It would be nice to know. But for all the hype Flex did and how easy is it supposed to be to create an app with CF, I wonder why someone can't answer this question once and for all. I know that others have posted to this and many other forums asking the same things I am. Is it too ask one of the Gurru of Adobe Flex, or anywhere else for that matter to help us?

    Not everyone wants to run their own server, and I think Adobe would have kept that in mind when creating Flex, and how he'd shared servers.

    So please if someone can help understand it please let me know.

    Thank you

    halodev:

    When I had my problems, I didn't have to touch the con. Correct XML file their and I initially worked in my localhost too. So, I don't know.

    I only did the site Flexstore-like as a study project. It is not real for any client project, and so I don't mind share. It might be a good idea for you to check the code just for comparison with yours; If you want, send me an email and I'll send you my mxml files.

    Carlos
    [email protected]

  • Gather_table_stats with a method to opt "for all indexed columns 0 size.

    I have 9 databases that I support that contain the same structure and concentrations of very similar data. We are seeing inconsistent performance in various databases due to bind variable peeking... I went down to the Min and Max values are collected during the analysis. I analyze from a cluster and these statistics of export/import in other groups... I will then on locking down the statistics collected. Some statistics are on tables that contain transient data (either purged old data and new data gets a new sequence number of PK).

    Since I am collecting statistics with a ' for ALL INDEXED COLUMNS SIZE 1', a min and max value entered. " This value is only appropriate for a short period of time and only for a specific database. I don't want oracle to know the density to help calculate, but I don't want cardinality from knowing if the current values for bind fall into this range of...

    Example of

    COLUMN PK

    When I analyze the min is 1 and max 5. I then let the database executed as well as the new min is 100 max 105... the same number of lines, but different min/max first select * table where pk > = 1 and pk < = 5 return cardinality of 5... Later, a select * table where pk > = 100 and pk < = 105 would return a cardinaility 1.

    Any ideas how to prevent this, other than to try the value min and max something myself (like min = 1 max = 99999999). ??

    MarkDPowell wrote:
    The SIZE of 1 means no histograms. Bind variable peeking must be done if you have histograms on the column, then you are sure that the problem is bind variable peeking?

    Mark,

    bind variable peeking has nothing to do with histograms, it is always performed so active and performs a hard analysis: http://jonathanlewis.wordpress.com/2006/12/11/bind-peeking/

    Of course, it is interconnected with histograms since these may introduce issues with equal comparisons, requiring different plans but are shared because of using bind variables (solved in 11 g adaptive cursor sharing with).

    Note that when the use of range comparisons even the pre - 10g release already checked the min/max values, it is only the equality comparison that checks the values min/max of 10g on.

    To the OP: collection of statistics using «For ALL INDEXED COLUMNS»... "is a bad idea in general, see for example: http://structureddata.org/2008/10/14/dbms_stats-method_opt-and-for-all-indexed-columns/

    If you use bind variable and range from comparisons then you will probably need to manipulate the statistics yourself / use advice if you cannot afford to collect statistics often enough to deal with changes.

    Kind regards
    Randolf

    Oracle related blog stuff:
    http://Oracle-Randolf.blogspot.com/

    SQLTools ++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676 /.
    http://sourceforge.NET/projects/SQLT-pp/

  • Bulk Insert to help for all is slow

    HII All,
    I have two sql scripts. Having just insert statements and the other using bulk insert both do the same thing.

    (1) using the Bulk Insert
    Set serveroutput on;
    
    Declare
              type t_hgn_no is table of r_dummy_1%rowtype
              index by binary_integer;
              type t_flx_no is table of varchar2(4000)
              index by binary_integer;
              
              l_hgn_no t_hgn_no;
              l_flx_no t_flx_no;
    
              begin_time number;
              end_time   number;
    
              
    Begin
         select (dbms_utility.get_time) into begin_time from dual;
         dbms_output.put_line('started at : '||begin_time);
         
         
         With t as
         (
         Select '100004501' HOGAN_REFERENCE_NUMBER , '320IVLA092811011' FLEXCUBE_REFERENCE_NUMBER from dual 
         union all
         Select '100014501' HOGAN_REFERENCE_NUMBER , '320IVLA092811010' FLEXCUBE_REFERENCE_NUMBER from dual 
         union all
         Select '100024501' HOGAN_REFERENCE_NUMBER , '320IVLA092811009' FLEXCUBE_REFERENCE_NUMBER from dual 
         union all
         Select '100034501' HOGAN_REFERENCE_NUMBER , '320IVLA092811008' FLEXCUBE_REFERENCE_NUMBER from dual 
         union all
         Select '100044501' HOGAN_REFERENCE_NUMBER , '320IVLA092811007' FLEXCUBE_REFERENCE_NUMBER from dual 
         union all
         Select '10006501' HOGAN_REFERENCE_NUMBER , '140IGL2092811951' FLEXCUBE_REFERENCE_NUMBER from dual 
         union all
         Select '100074501' HOGAN_REFERENCE_NUMBER , '320IVLA092811006' FLEXCUBE_REFERENCE_NUMBER from dual 
         union all
         Select '10007501' HOGAN_REFERENCE_NUMBER , '200IVLA092810617' FLEXCUBE_REFERENCE_NUMBER from dual 
         union all
         Select '100084501' HOGAN_REFERENCE_NUMBER , '320SVLA092810002' FLEXCUBE_REFERENCE_NUMBER from dual 
         union all
         Select '100094501' HOGAN_REFERENCE_NUMBER , '320IVLA092811005' FLEXCUBE_REFERENCE_NUMBER from dual 
         union all
         Select '100104501' HOGAN_REFERENCE_NUMBER , '320IVLA092811004' FLEXCUBE_REFERENCE_NUMBER from dual 
         union all
         Select '100114501' HOGAN_REFERENCE_NUMBER , '320IVLA092811003' FLEXCUBE_REFERENCE_NUMBER from dual 
         union all
         Select '100124501' HOGAN_REFERENCE_NUMBER , '320IVLA092811002' FLEXCUBE_REFERENCE_NUMBER from dual 
         union all
         Select '100134501' HOGAN_REFERENCE_NUMBER , '320IVLA092811001' FLEXCUBE_REFERENCE_NUMBER from dual 
         union all
         Select '100144501' HOGAN_REFERENCE_NUMBER , '320SVLA092810001' FLEXCUBE_REFERENCE_NUMBER from dual 
         union all
         Select '10016501' HOGAN_REFERENCE_NUMBER , '140IGL2092811950' FLEXCUBE_REFERENCE_NUMBER from dual 
         union all
         Select '10017501' HOGAN_REFERENCE_NUMBER , '200IVLA092810616' FLEXCUBE_REFERENCE_NUMBER from dual 
         union all
         Select '100217851' HOGAN_REFERENCE_NUMBER , '520USDL092818459' FLEXCUBE_REFERENCE_NUMBER from dual 
         union all
         Select '1002501' HOGAN_REFERENCE_NUMBER , '100PVL2092813320' FLEXCUBE_REFERENCE_NUMBER from dual 
              )
         Select HOGAN_REFERENCE_NUMBER,FLEXCUBE_REFERENCE_NUMBER
         bulk collect into l_hgn_no
         from t;
    
         forall i in 1..l_hgn_no.count
         
         Insert into r_dummy_1 values l_hgn_no(i);
    
         
    
    
    
    
    
    
         
         Commit;
         select (dbms_utility.get_time) into end_time from dual;
         dbms_output.put_line('ended at : '||end_time);
    
         
         
    Exception
              When others then
                   dbms_output.put_line('Exception : '||sqlerrm);
                   rollback;
    End;
    /
    Duration for bulk collect
    ==================


    SQL > @d:/bulk_insert.sql.
    starts at: 1084934013
    has completed at: 1084972317

    PL/SQL procedure successfully completed.

    SQL > select 1084972317-1084934013 double;

    1084972317 1084934013
    ---------------------
    38304




    (2) using the Insert statement
    Declare
              begin_time number;
              end_time   number;
    
    Begin
                        select (dbms_utility.get_time) into begin_time from dual;
                        dbms_output.put_line('started at : '||begin_time);
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('36501', '100CFL3092811385');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('106501', '100CFL3092811108');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('172501', '100SFL1092810013');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('192501', '100SVL2092814600');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('212501', '100SVL2092814181');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('272501', '100AFL309281B2LZ');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('292501', '100AVL2092812200');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('332501', '100SVL2092814599');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('346501', '100AFL309281B2LY');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('372501', '100SVL2092814598');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('382501', '100IVL1092811512');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('422501', '100SFL1092810020');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('432501', '100IVL1092811447');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('462501', '100CFL3092811107');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('492501', '100SVL2092814245');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('542501', '100AVL2092812530');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('592501', '100CFL3092811105');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('612501', '100SVL2092814242');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('632501', '100CFL3092811384');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('712501', '100PVL2092813321');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('722501', '100PVL2092813311');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('732501', '100PVL2092813341');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('742501', '100PVL2092813319');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('752501', '100PVL2092813308');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('762501', '100PVL2092813338');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('772501', '100PVL2092813316');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('782501', '100PVL2092813305');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('786501', '100CFL2092810051');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('792501', '100PVL2092813335');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('802501', '100PVL2092813313');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('812501', '100PVL2092813302');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('822501', '100PVL2092813332');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('832501', '100PVL2092813310');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('852501', '100PVL2092813329');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('862501', '100PVL2092813307');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('872501', '100PVL2092813299');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('882501', '100PVL2092813326');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('922501', '100PVL2092813304');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('932501', '100PVL2092813296');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('952501', '100PVL2092813300');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('962501', '100PVL2092813293');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('972501', '100PVL2092813323');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('982501', '100PVL2092813297');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('1002501', '100PVL2092813320');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('1012501', '100PVL2092813294');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('1022501', '100PVL2092813290');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('1032501', '100PVL2092813317');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('1042501', '100PVL2092813291');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('1052501', '100PVL2092813287');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('1062501', '100PVL2092813315');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('1072501', '100PVL2092813288');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('1082501', '100AFL309281B2LX');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('1092501', '100PVL2092813312');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('1102501', '100PVL2092813285');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('1112501', '100PVL2092813284');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('1122501', '100PVL2092813309');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('1142501', '100PVL2092813281');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('1152501', '100PVL2092813306');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('1162501', '100PVL2092813282');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('1166501', '100CFL3092811383');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('1212501', '100IVL1092811445');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('1232501', '100IVL1092811526');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('1272501', '100IVL1092811441');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('1292501', '100IVL1092811523');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('1302501', '100PVL2092813303');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('1312501', '100PVL2092813279');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('1322501', '100PVL2092813278');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('1332501', '100PVL2092813301');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('1342501', '100PVL2092813276');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('1352501', '100PVL2092813275');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('1376501', '100AFL309281B2LW');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('1382501', '100PVL2092813272');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('1392501', '100PVL2092813298');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('1402501', '100PVL2092813273');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('1412501', '100PVL2092813269');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('1446501', '100RNF6092810019');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('1452501', '100IVL1092811436');
    
                        insert into r_dummy (HOGAN_REFERENCE_NUMBER, FLEXCUBE_REFERENCE_NUMBER)
                        values ('1492501', '100CFL3092811382');
    
         
    
                        
                        select (dbms_utility.get_time) into end_time from dual;
                        dbms_output.put_line('ended at : '||end_time);
    Exception
              When Others Then
                         dbms_output.put_line('Exception Occured '||sqlerrm);
                         rollback;
    End;
    /
    duration for the insert script
    ====================
    SQL> @@d:/insert_bhanu.sql
    started at : 1084984928
    ended at : 1084988401
    
    PL/SQL procedure successfully completed.
    
    SQL> select 1084988401 - 1084984928 from dual;
    
    1084988401-1084984928
    ---------------------
                     3473
    I waz impossible of past all of the code... He has almost 13851 records. Please suggest me the best option, and if there is another way to achieve this.
    I need to provide a solution optimized to my clients.

    Concerning
    Rambeau.

    792353 wrote:

    I have two sql scripts. Having just insert statements and the other using bulk insert both do the same thing.

    Not really valid for the purposes of comparison.

    The fundamental question is what makes in bulk for faster processing. It is a well-known and easily answered--reduction in context switches between SQL and PL/SQL engines. And that's all. Nothing more and nothing magical.

    The easiest way to show this difference is to eliminate all other factors - especially I/O as a trial may be at a disadvantage by the physical i/o, while the comparison test can be promoted by e/s logic. Another factor that must be eliminated is extra unnecessary SQL that adds more overhead (such as the use of DOUBLE and unions) and so on.

    Remember that it is critical for the reference driver to compare like with like and eliminate all other factors. As simplistic as maybe keep it. For example, something like the following:

    SQL> create table foo_table( id number );
    
    Table created.
    
    SQL> var iterations number
    SQL> exec :iterations := 10000;
    
    PL/SQL procedure successfully completed.
    
    SQL>
    SQL> declare
      2          t1      timestamp with time zone;
      3  begin
      4          dbms_output.put_line( 'bench A: hard parsing, normal delete' );
      5          t1 := systimestamp;
      6          for i in 1..:iterations
      7          loop
      8                  execute immediate 'delete from foo_table where id = '||i;
      9          end loop;
     10          dbms_output.put_line( systimestamp - t1 );
     11  end;
     12  /
    bench A: hard parsing, normal delete
    +000000000 00:00:07.639779000
    
    PL/SQL procedure successfully completed.
    
    SQL>
    SQL> declare
      2          t1      timestamp with time zone;
      3  begin
      4          dbms_output.put_line( 'bench B: soft parsing, normal delete' );
      5          t1 := systimestamp;
      6          for i in 1..:iterations
      7          loop
      8                  delete from foo_table where id = i;
      9          end loop;
     10          dbms_output.put_line( systimestamp - t1 );
     11  end;
     12  /
    bench B: soft parsing, normal delete
    +000000000 00:00:00.268915000
    
    PL/SQL procedure successfully completed.
    
    SQL>
    SQL> declare
      2          type TNumbers is table of number;
      3          t1      timestamp with time zone;
      4          idList  TNumbers;
      5  begin
      6          dbms_output.put_line( 'bench C: soft parsing, bulk delete' );
      7          idList := new TNumbers();
      8          idList.Extend( :iterations );
      9
     10          for i in 1..:iterations
     11          loop
     12                  idList(i) := i;
     13          end loop;
     14
     15          t1 := systimestamp;
     16          forall i in 1..:iterations
     17                  delete from foo_table where id = idList(i);
     18          dbms_output.put_line( systimestamp - t1 );
     19  end;
     20  /
    bench C: soft parsing, bulk delete
    +000000000 00:00:00.061639000
    
    PL/SQL procedure successfully completed.
    
    SQL> 
    

    Why an empty table? Eliminates potential problems with the physical versus logical I/O. Why a delete and not Insertstatement? The same reason.

    The foregoing shows how slow hard analysis is clear. It has the advantage of soft analysis. It has the advantage of reducing the change of context, at the expense of additional memory - as bench 3 consumes much more memory (PGA) that other points of reference.

    Also note that these marks the exact same delete SQL statements - using different approaches. Where the approach only (and not the SQL) made the difference. This means that we can draw valid conclusions on each of these approaches.

    Can we say the same thing with the scripts you used to "show" that the treatment bulk is apparently slow?

Maybe you are looking for

  • my screen went big icon are massive

    my computer crashed now my screen has massive disappeared, how to return to normal, please.

  • Re-install win 7 pro

    Hello I had to reinstall win 7 pro due to a hardware conflict with win10.  I'm on an internet connection of budget and have had to face for days and hours to get windows update.  Its wasting my money.  Is there another way to get all the updates?  I

  • New Windows Setup failed 5 times for no reason.

    So my sister has trashed his laptop. I wanted to clean up behind him. She got a few nasty ransomware a fake Web site, etc. etc. I took out the hard drive formatted on another PC, reconnect the laptop and a Windows 7 Home Premium ISO wrote it with Ruf

  • Don't push error no application instance

    I have a problem with the function of insertion for several days. I think you could help me -J' have request to push most of RIM, get the port, appid,. -J' I already install BPSS on public server. and installation push config following details above.

  • Dialogue of VPN connection extremely laggy

    Hello Recently I had some strange problems with VPN SSTP in Windows 7. For some reason, the connection process became very slow. When it is used to take a few seconds to connect, it now takes only minutes. Once it is connected, the VPN connection wor