Slow record insertion when using millions of queries in one transaction

For test purposes, we play a table creation scenario (no indexes) under multiple conditions : we insert records in bulk mode or one by one, with or without transactions, etc.
In general, the record insertion is ok, but not when we try to insert 1 million record one by one (sending 1 million INSERT commands) in a single transaction: in this case, the insertion is quick enough for the first 100000 records approximatively, but then, it becomes extremely slow, so that it would take several days to complete. This doe not happen whithout the transaction.
We were not able to find the database parameters to change to gain a better performance : rollback? transactions? undo? what else?
Does anybody have an idea of teh parameters to modify?
Thank-you in advance.

>
For test purposes, we play a table creation scenario (no indexes) under multiple conditions : we insert records in bulk mode or one by one, with or without transactions, etc.
In general, the record insertion is ok, but not when we try to insert 1 million record one by one (sending 1 million INSERT commands) in a single transaction: in this case, the insertion is quick enough for the first 100000 records approximatively, but then, it becomes extremely slow, so that it would take several days to complete. This doe not happen whithout the transaction.
>
Hi
How are you inserting the one million records when you do one at a time? If it's within a loop, you are probably doing a COMMIT as well within the loop. This will cause log file sync waits as LGWR will be too busy writing the redo entries. This will slow down the insert process as well as the performance of database. This is an expected bahaviour. Commit causes checkpoint to triiger which in turn will make log writer write the redo entries in the online redo logs. This is a serial process.
You can do the following methods to insert bulk records
a) INSERT /*+ APPEND */ into table select * from stage;
This will cause direct path load to happen bypassing buffer cache and reducing the redo to a great extent. However if you have foreign keys enabled in the table, it will silently ignore the direct path directive and do the conventional load.
b) Forall....SELECT ...BULK COLLECT..... This will be a good method when you do from PL/SQL
c) When you do within a loop
    Declare
    v_commit_cnt Number := 0;
   Begin
    For i in (select col1, col2, col3 from billion_record_table)
    Loop
     v_commit_cnt := v_commit_cnt + 1;
     Insert into target values (i.col1, i.col2, i.col3);
     If (v_commit_cnt >= 50000) Then
      commit;
      v_commit_cnt := 0;
     End If;
   End Loop;
   COMMIT;
End;
/4) If the target table is a staging table, you can do a CTAS (Create table as SELECT)
and many more options if you plan well in advance.

Similar Messages

  • I have a HP610-1150f. not recording sound when using webcam in touchsmart screen.

    I have a HP610-1150f. not recording sound when using webcam in touchsmart screen.  I have looked thru this forum and I don't see anyone else having this problem. (unless I missed it).  The recording works in Notes, but not when I open Webcam and try to record from there. video recording works fine. I have had this computer less than a month and I am having a couple of problems with it. Still loving it though.

    Hello schae731: Welcom to HP Forum and your new Touchsmart. You need to contact HP Direct Support on line your Touchsmart comes  with one year warranty so use it why you can. You can contact them through your HP Support Assistant or on line. They will help you with trouble shoot the web-cam software. Goto your computers model and make support web-site. They will also help you with your other issues as well.
             I am using the older version software so I won't be much help. Please repost if HP direct support is un able to help you resolve your issues. While you are chatting with them have them check out your computer do it before your 1 year warranty expires. Have fun with your new computer.

  • Slow(er) startup when using captive runtime on windows

    I  just converted two AIR apps from native exe installers (requiring AIR installed) to Captive Runtime relases (just a folder structure).
    One difference i see is that my applications now load a little slower (because of the packaged instead of installed runtime?).
    When using flex 4 sdk the white and centered flex4-loadbar now appears for a few seconds before the splash screen of the app. appears. The same happens when using flex 3 sdk (in compatibility mode) but instead the "initializing" text appears.
    Is this slowdown a known effect of the captive runtime packaging?

    I responded to your other thread in the bugs forum but wanted to also respond here.
    I'm not aware of any slower performance implications when using the captive runtime but I'm going to investigate further.  In the meantime, would you mind opening a new bug over at bugbase.adobe.com regarding the startup performance hit?  It would be great if you could also provide us with a sample application that illustrates the slower startup time.  If you'd like to keep it private, please email me directly at [email protected]
    Thanks,
    Chris

  • My iphoto 09 keeps on downloading duplicates to a temp folder without asking when I drag a photo from firefox over to iphoto to import it.  It does not happen when using safari.  can some one please help?

    My iphoto 09 keeps on downloading duplicates to a temp folder without asking when I drag a photo from firefox over to iphoto to import it.  It does not happen when using safari.  can some one please help?

    You're in the wrong forum. Post to iPhoto for iLife, not iPhoto for iOS.

  • Control multiple updates and queries within one transaction in JPA

    Hi,
    I have a question regarding control multiple updates and queries within one transaction. We are using EclipseLink 2.3.1. With below code, will I be able to:
    - have all insert, update, select queries committed in one transaction;
    - queryGetBalance will return the latest OrgBalance after update;
    - if one fails, everything rolls back.
    Thanks!
    Jeffrey
    PS: I realized that I cannot use em.getTransaction().begin() and em.getTransaction().commit(), since I am using JTA.
    =============
    @PersistenceContext(unitName="Test")
    EntityManager em;
    em.setFlushMode(FlushModeType.COMMIT);
    newTransaction.setAmount(1000);
    newTransaction.setType("check");
    em.persist(newTransaction);
    orgAudit.setUpdateUser("Joe")
    orgAudit.setupUpdateTime(time);
    em.merge(orgAudit);
    Query queryUpdateBalance = em.createQuery("update OrgBalance o set o.balance = o.balance + :amount where orgId = :myOrgId");
    queryUpdateBalance.setParameter("amount", 1000);
    queryUpdateBalance.setParameter("myOrgId", 1234);
    Query queryGetBalance = em.createQuery("select OrgBalance o where o.orgId = :myOrgId");
    queryGetBalance.setHint("javax.persistence.cache.storeMode", CacheStoreMode.REFRESH);
    queryGetBalance.setHint("javax.persistence.cache.retrieveMode", CacheRetrieveMode.BYPASS);
    queryGetBalance.getResultList();
    em.flush();
    Edited by: JeffreyW on Dec 12, 2011 10:34 AM

    Yes, the operation will be in a single transaction, assuming you are using a JTA managed SessionBean and the code is part of a SessionBean method.

  • Slow downloading times when using the cloud

    Has anybody else noticed slow loading times when transfering files via the cloud? We have tested speeds across three of our magazines each on different networks. Some are faster than others but overall the speeds are still slower than we would hope.
    I did have a problem with Adobe servers many months ago when we were still using V11 and the rest of the world was on V17 but the engineering team at Adobe quickly fixed this for us. I am just wondering how everybody else is getting on time wise when downoaoding folios, it may be we have a problem with our network than needs addressing internally.
    Thanks
    Liam

    Katy ..
    I try to click a link I get a redirect loop message.  Also on some websites such as bbc.co.uk or hotmail will not load and I get the message
    Try troubleshooting malware >  The Safe Mac » Mac Malware Guide
    iCloud isn't the issue.

  • Slow Disk error when using Finale Cut

    I get a slow disk error when trying to play something in finale cut but when i try to verify disk and repair disk i get Error: Could not unmount disk. What is going on and how do i fix it?

    You have to boot from a DVD or external OS to fix the Disk. You can't unmount a disk that is currently hosting your operating system.
    http://support.apple.com/kb/ts1417

  • Insert data into two related tables in one transaction

    Hi all,
    I’ve got problem with developing functionality.
    Background:
    I’ve got two tables: OFFER_HEADER and OFFER_CONTENT
    For now, user has to insert and commit the OFFER_HEADER(single-row view), then content becomes reachable and OFFER_CONTENT(multi-row view) can be filled. It is being done by choosing record from PRODUCTS form and inserting values into OFFER_CONTENT. Product data can be modified on the CONTENT form canvas.
    My goal:
    I know that is not convenient way to implement the functionality. I want to insert all the data(header and content) in one transaction. What is the best way to do it?
    Thanks in advance,
    Best Regards,
    Bartek

    1. User is on the OFFER_CONTENT canvasOk
    2. User presses ‘+’ buttonOk
    3. On the screen is displayer PRODUCT list
    4. User set focus on desired product
    5. Using popup menu user choose ‘Add’ option
    6. PRODUCT list is being closedSo, the functionlatity is like a LoV?
    7. OFFER_CONTENT is being shown with set of information from the productOk, you would either take the values directly from the fields of the PRODUCT-list and copy them into the OFFER_CONTENT-fields, or you just get something like the PRODUCT-ID from your PRODUCT-list and use a SELECT to read the product-details into the OFFER_CONTENT-block
    8. User can then manually change desired elements of the recordOk.
    So, where do you have the need to do an INSERT in your scenario?

  • Slow query return when using TAOD

    My colleague always use TAOD to run query. ( I tried hard to tell them not, believe me). Even I tuned one of their queries and the return became very fast in the SQLplus mode, the return in the TOAD window was still slow, 10 seconds vs 56 seconds. I wonder what reason that makes the return passing to TOAD slow. Some tuning of Oracle Net or it is on the TOAD side? It occurred when passing to Crystal Report. Any suggestion.

    OK, I had applied both statistic optimizations on Dev box Oracle 10g (AIX), and asked my client to use her TAOD, it seemed faster. But I noticed that under the udump, the system generated a trc file with such content.
    *** SESSION ID:(1064.11535) 2007-11-28 12:15:45.384
    2007-11-28 12:15:45.380: [  OCROSD]utgdv:2:ocr loc file  cannot  be opened
    2007-11-28 12:15:45.393: [  OCROSD]utopen:1: Couldnt find ocr,[ocrmirror] location in config file
    2007-11-28 12:15:45.404: [  OCRRAW]proprinit: Could not open raw device
    2007-11-28 12:15:45.408: [ default]a_init:7!: Backend init unsuccessful : [33]
    2007-11-28 12:15:45.408: [ CSSCLNT]clsssinit: error(33 ) in OCR initializationI looked metalink and here, could not find any clue what it is about?

  • Problem with RAM and slowing of computer when using CS5 can anyone help please?

    Hello I am having big problems at the moment with a slow computer when I am using Photoshop CS5 I am informed that I am low on memory.  I do not store any photographs on my computer they are all on an external hard drive, the only image on the computer are the ones I am working with.  I have been in touch with Norton who think it is an Adobe issue can anyone help please, looking forward to hearing from you and to a swift fix of the problem
    Best wishes
    Sheila

    How much memory do you have installed, and what operating system are you running?
    Mark

  • GarageBand stops recording immediately when using Guitar Rig Session

    When I try to record a guitar into GarageBand using my Guitar Rig Session the recording starts, then immediately stops. This happens on a new track, or on an existing track. Everything was fine before I updated GarageBand to the latest version (6.0.4) via the App Store. I also updated to OSX 10.6.8 too. I've tried recording a track in Reaper and it works fine so I doubt it's a Guitar Rig/OSX 10.6.8 issue so I'm suspecting that it's the latest GarageBand version that's to blame. This discussion was the closest thing I could find to raise a support ticket about this. I'll have to switch to Reaper for now but if it's not fixed soon, I may not come back to GarageBand!

    Native Instruments say they'll have a fix to make their software work in Lion in September. From what I've heard it only affects them running in 64 bit mode so try Guitar Rig in 32 bit mode if you can. I've switched to Reaper like I said and I'm finding the transition quite easy. Give their demo a try...

  • WebKit2Webprocess.exe*32 is slowing down safari when using flash player and using up Lot's of CPU

         Im having Major Troubles with Safari whenever I start up Safari I get a Process Called WebKit2WebProcess.exe*32 using not much memory after about 30sec its using around half of what safari is using.After a minute its around 3/4th. But It all starts when I try to basiclly go to another page , its now using higher then safari and rapidlly increasing(and even faster when Flash is in use). Right now the process is using 170 000 K and Safari is using around 130 000 K while im typing this. When i go to youtube it uses 290 000 K and safari runs slower. Its even worse with games when i tested a game                
    website: http://ninjakiwi.com/Games/Tower-Defense/Play/Bloons-Tower-Defense-5.html
    Safari is now lagging furiusly only on the site but not the other tabs.
    !!!!Please help Safari is my favorite Browser and i reallly dont want to be forced to delete it!!!!

    I love using the Safari Browser compared to any other browser, however the file webkit2webprocess occupies a lot of memory and slows down the browsing, what does this file do and why on earth does it require so much of memory can apple not fix this bug. Have contacted Apple support but nobody seems to have an answer on this issue.  Come on Apple please do not ignore this problem!!

  • How to config MediaSense to recording video when used video advantage with CIPT

    I configured SIP Trunk between CUCM8.6 and MediaSense 8.5. And call between CIPT and 7975 both Video Capabilities is Enable.
    Video Call is active fine but when play from Mediasense have only audio not video record.

    i have iphone4 32gb.
    my auto focus also not working.i was tried everthing but not work.
    -restore firmware/ios = not working
    -install super camera = not working
    and lastly i've got the problem solved!
    step 1:
    open your default camera application and dont close it.
    step 2:
    flick the rear camera using your finger at the top side and the back side of the camera lens,
    and that same time too try to tap your screen to help your camera to force/help/make auto focus function to work.
    and now your camera + auto focus is working!!

  • Macbook pro is slowing or freezing when using fcp x

    I am having a nightmare with FCP X performance.  It just can't be right that problems I am having are normal.  I have a new macbook pro with 2.6Ghz , 16GB Ram, 512 SSD and connected to a lacie thunderbolt rugged drive.  Just about as good as it gets outside a monster mac pro right.  When editing the projects I am getting consistent delays of a second or more and randomly I get ones that are longer and the machine freezes completely.  When I try and look into it on activity monitor the only thing that seems to be taxed is the RAM but even that does not seem to be maxed.  Sometime if I clip on another app there is a delay and I thought maybe that could be because FCP X is hogging the RAM but can't tell. All software is up to date. The projects do have mixed frame rates and resolutions but that should be ok.  I have not even started to colour correct yet, there are a number of retiming and effects but nothing much. 
    It is driving me crazy as I am looking to use shortcuts and keyboard commands but I am constantly waiting….. very…very..frustrating.  I have set prefs to better performance and tried proxy editing while editing.  I have switched of background editing as well.  I can not use this software anymore if this is what I must get used to.  Please can anyone help with this as it is going to cost me money.  I have been using FCPX for a while and don't want to have to learn a new one when this should work.
    I am still unsure if I should render only when in original footage pref and if I shouod render before exporting.  I do render as I thought it would output a lower bit rate if not.
    Thanks for your time and any advice is welcome
    A

    With such a machine the slowness is *not* normal. Does it happen *all the time*? 
    You are right that low RAM is often the cause of slowdowns, but that would happen if your free RAM is in the tens of MB - it does not seem to be the case.
    Do you have many projects and events available? All these take up RAM. You can disable the projects and events that you are not working on - use Event Manager or manually create a "Final Cut Events - Hidden" and a "Final Cut Projects - Hidden" folder and move unused events and projects in the Finder (while FCP X is not running).
    The usual first recommendation is to trash your preferences. All sorts of misbehavior can occur if the preferences files get corrupted. Use Preference Manager (free from Digital Rebellion) to trash your preferences.

  • Visual Studio 2013 slows down + crashes when using Source Control features.

    I have spent two full days trying to resolve this issue but no luck so here we go,
    I have created a project using Visual Studio Team Foundation Server plug-in in the past. Later on I switched to
    Microsoft Git Provider.
    Now when I connect to that project in the Team Explorer and double click on the solution to work on it locally it somehow changes the plug in to Microsoft Git Provider automatically and of course I can't
    Commit/Commit and Push since I receive following error in the Team Explorer,
    An error occurred. Detailed message: Failed to open directory 'C:/Users/.../AppData/Local/Application Data/'
    Manually changing the plug-in to the Visual Studio Team Foundation Server
    results in a broken Team Explorer as below,
    With Settings leading to an empty pane, and also a warning in the Team Explorer's Changes page telling me the message below if I click on Pending Changes...
    Microsoft Git Provider is not the current Source Control plug-in. Change Plug-in
    And manually selecting the solution from Solution Explorer, right click and
    Add Solution to Source Control, leads to never ending hour glass and (Not responding) visual studio.
    New Projects
    Creating a new project is straight forward, unless I "Add to Source Control" is checked. If so, again never ending process if Microsoft TFS plug-in is selected in the tools and eventually me Ending the Visual Studio task. And a VERY long process
    (40+ mins) if I have chosen Microsoft Git but that finishes successfully rather.
    New TFS project from Team Explorer
    If I create a new project in my Online Web Studio
    Click on Open with Visual Studio Link => Opens and connects to a my newly created TFS in team explorer.
    Clicking new in Team Explorer under Solutions to create a new solution and bind it to this Repo
    leads to straight crash of Visual Studio and restarting attempt of VS.
    So I really can't use Source Control from visual studio other than cloning GitHub's existing repo's on Visual Studio and Committing my current Microsoft Git managed projects.
    I have attempted
    Repairing Visual Studio (no luck in results)
    Devenv.exe /setup (no luck)
    Trying to scrap the SCC info on my solution then at least it won't get picked up by source control then I can Check it in as a new project. (no luck and the solution picks the Microsoft Git upon opening it by clicking on the .sln file.) I have followed
    these steps in this stack overflow answer.
    And lots of mucking around like removing my workspaces almost Thousand times and putting them back, binding and etc.
    I am really stuck on this and it's holding me back from staring a new project (which is problematic using Adding to Source Control) and unfortunately is dependent on the old project (which is developed under Visual Studio Team Foundation Server Plug-in which
    is throwing tantrums)
    Would like to hear you pro-s input on this
    Using 
    Visual Studio 2013 Community edition (recently switched from Pro to Express to Community)
    Windows 7 (64-bit)
    Git tools
    Git windows installation
    Nuget Package manager
    Visual Studio Log File
    http://filesave.me/file/50620/log-txt.html
    Mehradzie

    Hi Mehradzie,
    Based on the description, seems you're working with Git team project in Visual Studio Online(formerly Team Foundation Service). I'd like to know whether you mean Visual Studio Git command tool as the plug-in, and if you're trying to create solutions/projects
    with Visual Studio and add them to the created Git team project.
    From the screenshot, you're not connect to the Git team project by using Team Explorer. To work with Git team project locally, you can follow the instructions as below:
    Connect to Git team project by using Team Explorer, after that you might install Git tools if you connect to the team project for the first time
    Clone the remote Git repository to a local git repository and set the path to local git repository
    Create a solution and select Git source control, also saved to the local path of the local git repository
    Select your branch, and then click "Changes" and Commit the changes
    Click "unsynced commits" and push the commit to remote git repository
    You can also refer to the links below for more information about getting started with Git in Visual Studio Online.
    http://www.visualstudio.com/en-us/get-started/share-your-code-in-git-vs.aspx
    http://blogs.msdn.com/b/visualstudioalm/archive/2013/01/30/getting-started-with-git-in-visual-studio-and-team-foundation-service.aspx
    If you still have any other concerns, please elaborate more details about your scenario. Thanks for your understanding.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • Adding an eSATA External Drive Success Story

    Aim: Add an eSATA external drive to a QIP 7232 2. Note: Links are to products on Amazon, but other vendors sell the same equipment. 1. Purchase a Western Digital AV-GP 2 TB AV Hard Drive, 3.5 Inch, SATA II, 64 MB Cache - WD20EURS, $109. Two terabytes

  • New development for Return

    We developed new programme to accomodate Part 2 posting whie taking return from customer. So that there is no need to post seperate excise JV and GL accounts are automatially updated.. In this tcode we feed invoice number(Return billing num), invoice

  • How to set up account  2 account on same email

    I just got an ipad 2 and my daughter has had an ipod, now apple keeps mixing up the accounts. She has a different password, but it just keeps going to her account. How do I fix this. Thanks Betty

  • Can't find where to add formulas to a table in Pages 5

    I have a Pages 09 document with tables set up to track assignments and point values for the classes I teach. I prefer to work in Pages and not Numbers because of some page formatting issues. I used to be able to highlight point values in a column and

  • How do i get past the first time user restriction, ask to review then goes in circles

    Trying to download whatsapp, errorcomes up , id not used before, review, after reviewed says sign in then comes up review again and so on