Why is it updated more quickly remove them?

I have a huge table L_CLAIMTEMP_RSMREPORTS. This package contains 9 million documents. I'm truncating and fill every day using sql * Loader.
I'll just give you the sequence of steps I do, time and the number of rows affected.
1 DELETION of table l_claimtemp_rsmreports - 4 million deleted rows - 45 min time taken, engage published
2. switch to update the table l_claimtemp_rsmreports using the values of the other table - 5 million lines update-10 mins, Commit
3 deletion of table l_claimtemp_rsmreports again based on certain conditions - 4 million lines deleted - 45 mins, commit issued

Finally, the lines I need is 1 million. Then, I changed my procedure in this way:
1. switch to update the ll_claimtemp_rsmreports table I-need, set a flag in rows of 5 million 'U' update-10 minutes of catch,
2 update the l_claimtemp_rsmreports table that has the flag as 'U' by using the values in the other table - 5 million lines updates-10 mins, Commit
3 put to update the table l_cliamtemp_rsmreports with indicator as long as the pavilion where 'X' = 'U' - 1 million rows updated - 5 minutes, engage

Here I am to pick up the records in the table l_claimtemp_rsmreports of the pavilion where = 'X '.

What I realized is much faster. But, I did not understand why. I had faced the problem earlier too. I can generalize update is faster than delete it?
Or is it just my hypothesis?

My version of oracle's 11g.

>
...

What I realized is much faster. But, I did not understand why. I had faced the problem earlier too. I can generalize update is faster than delete it?

As a general rule, I would say an update is usually faster then a deletion.
As it has been noted that an update should do less work then a deletion. But it depends largely how the update is done and how the structure of the table to delete.

Here are some steps that the database will do when executing each command. These steps are not complete, but they contribute to make the image.

Update
-lock the record/block
-run the front trigger for update statement
-for each line, run the front row update trigger
-check if there is a constraint (unique / cheque) column
-change data
-If the new value does not fit into the current block more add a new block for the table (chaining line). This often happens when you update a column value of 5 characters to 1000 characters
-change/update all index on this column
-for each row execute the trigger line after update
-run the trigger for update statement after

delete
-lock the record/block
-execute delete it before statement
-for each line, run the front row update trigger
-check if there is pointing to this table FKs
-If the tables so a select on all the details to see if there are child records
-According to FK delete the childs or generate an error message
-Mark as deleted line. The space is freed for future pads according to pctfree and similar storage settings
-change all indexes on this table
-for each row execute the delete after start of line
-execute delete them after outbreak of statement

This isn't even including the cancellation information

In general I think that most of the actions for a deletion are more expensive than for an update. Especially for an update on a column not indexed, where only 1 character is added or changed.

However, very often the update/deletion is not the limiting factor, but select it happening before the update and who finds all rows that need to be changed.

Published by: Sven w. January 7, 2011 11:18

Tags: Database

Similar Questions

  • Update problem can remove them except for the most recent? Thank you!

    Hello!  In Control Panel, there are about 20 programs that all say the same thing.  They are updated for Windows and IE 8 security.  The only difference is the date, which date as far back as 2010.  Can I remove them except for the most recent?  Thank you!

    # They are all necessary.

  • Why objects are still after I remove them?

    I deleted several masks of a model that is used in another comp. Before I upgraded to CS6 it would reflect on the main computer if I removed it the secondary model, but this is not the case... entirely. It removes with the exception of a few seconds at the beginning of my arrival main deleted items are still there. I don't know how he does it since I deleted the objects of the model. Is this a bug of CS6?

    Could be one of those issues of CS6 disk cache. Clear the cache in the Edit menu.

    Mylenium

  • Pop-up ads continue despite all the information here regarding remove them.  I think they were watching when I downloaded an update for Adobe Flash Player.  All of the suggestions!

    I use OS x El Capitan 10.11.2 on my 3.2 GHz, 8 GB Mac.  I keep getting the pop - ads that those scam ads reply and get their malicious software solution.  I also get the help line 'Apple' where someone's endearing supposedly walk me if they can help.  I tried all of the solutions in the Apple support groups, but nothing has worked... remove extensions (don't have), in order to put the files listed in 'Go to Folder' (none came, so I couldn't remove them).  Any ideas?  It seems that it got worse after I received a notice to update my Adobe Flash Player... maybe a false update.

    1. the present proceedings is a diagnostic test. It doesn't change anything for the better or worse and therefore, by itself, will not solve the problem. But with the help of the results of the tests, the solution may take a few minutes, instead of hours or days.

    The test works on OS X 10.7 ("Lion") and later versions. I do not recommend running it on older versions of Mac OS X. It will do no harm, but it will not do not much good.

    Do not be put off by the complexity of these instructions. The process is much less complicated than the description. You make the tasks more complicated with the computer all the time.

    2. If you do not already have a current backup, please back up all the data before doing anything else. The backup is needed on the general principle, not because of what anyone in the test procedure. Backup is always a must, and when you encounter any kind of problems with the computer, you can be more than the usual loss of data, if you follow these instructions or risk not.

    There are ways to back up a computer that is not fully functional. Ask if you need advice.

    3 here is instructions to run a UNIX shell script, a type of program. As I wrote above, it doesn't change anything. It does not send or receive data over the network. There is no to generate a report on the State of the computer human readable. This report goes nowhere unless you choose to share it. If you prefer, you can act on it yourself without disclosing the contents for me or someone else.

    You should ask yourself if you can believe me, and if it is safe to run a program at the request of a foreign national. In general, no, he's not sure, and I encourage it.

    In this case, however, there are ways for you to decide if the program is safe without having to trust me. First of all, you can read it. Unlike an application that download you and click to start, it is transparent, so any person with the required competence can check what it does.

    You may not be able to understand the script yourself. But variations of it have been posted on this site of thousands of times over a period of years. The site is hosted by Apple, which does not allow it to be used to distribute harmful software. One of the million registered users to have read the script and set off the alarm if it was dangerous. Then I wouldn't be here now, and you would not be reading this message. See, e.g., this discussion.

    Another indication that the test is safe in this threadand this onecan be found, for example, where the comment in which I suggested it was recommended by one of the specialists of the communityApple, as explained here.

    However, if you cannot satisfy yourself that these instructions are safe, do not follow them. Ask other solutions.

    4. here is a general summary of what you need to do, if you decide to go forward:

    ☞ Copy a particular line of text to the Clipboard.

    ☞ Paste into the window to another application.

    ☞ Wait for the test to run. It usually takes a few minutes.

    ☞ Stick the results, which will be copied automatically, in a response on this page.

    These are not specific instructions; just a glimpse. The details are in parts 7 and 8 of this comment. The sequence is: copy, paste, wait and paste it again. You don't need to copy a second time.

    5. try to test in conditions that replicate the problem, to the extent possible. For example, if the computer is slow intermittently, run the test during a downturn.

    You may have started up in safe mode. If the system is now in safe mode and works pretty well in normal mode to test run, restart as usual before running it. If you can test only in safe mode, this.

    6. If you have more than one user and a user is affected by the problem, and the user is not an administrator, and then run the test twice: once under the affected user and one administrator. The results can be different. The user that is created automatically on a new computer, when you start it for the first time is an administrator. If you are unable to log in as an administrator, verify that the user concerned. More personal Mac have only one user, and in this case this section does not apply. Don't log in as root.

    7 load the linked web page (the site "Pastebin.") The title of the page is 'Diagnostic Test'. Under the title is a text box, headed by three small icons. The right one represents a Clipboard. Click on this icon to select the text, then copy to the Clipboard of your computer by pressing Control-C key combination.

    If the text is not highlighted when you click the icon, select it in triple - click anywhere inside the box. Do not select the whole page, just the text in the box.

    8. start the Terminal application integrated in one of the following ways:

    ☞ Enter the first letters of his name in a Spotlight search. Select from the results (it should be at the top).

    ☞ In the Finder, select go utilities ▹ of menu bar or press the combination of keys shift-command-U. The application is in the folder that opens.

    ☞ Open LaunchPad and start typing the name.

    Click anywhere in the Terminal window to activate it. Paste from the Clipboard into the window by pressing Command + V, then press return. The text that you pasted should disappear immediately.

    9. If you see an error message in the Terminal as "Syntax error" or "Event not found", enter

    exec bash

    and press return. Then paste the script again.

    10. If you logged in as an administrator, you will be prompted for your login password. Nothing displayed when you type. You won't see the usual points instead of the characters typed. Make sure that caps lock is turned off. Type carefully, and then press return. You can get a warning to be careful. If you make three unsuccessful attempts to enter the password, the test is still running, but it will produce less information. If you do not know the password, or if you prefer not to enter, just press back three times at the password prompt. Yet once again, the script will run.

    If the test takes much longer that usual to run because the computer is very slow, you can be prompted for your password a second time. The permission you grant by entering it will expire automatically after five minutes.

    If you are not logged as an administrator, you will be prompted for a password. The test will run. It just will not do anything that requires administrator privileges.

    11. the test may take a few minutes to run, depending on the number of files you have and the speed of the computer. A computer that is abnormally slow may take more time to run the test. During execution, a series of lines is displayed in the Terminal window like this:

        Test started
            Part 1 of 4 done at: … sec        …        Part 4 of 4 done at: … sec
        The test results are on the Clipboard.
        Please close this window.

    The intervals between the parties will not be exactly the same, but they give an approximate indication of progress.

    Wait for the final message "Please close this window" appears. If you don't see it in about 15 minutes, the test probably won't be all within a reasonable time. In this case, press the Ctrl + C key combination or the point command to stop it. Then go to the next step. You will have incomplete results, but still something. If you close the window of the Terminal, while the test is still running, the partial results will not be saved and you have to start over.

    12. when the test is finished, or if you have stopped it because it was taking too long, leaving the Terminal. The results have been saved to the Clipboard automatically. They do not appear in the Terminal window. Please do not copy from there. All you have to do is start a response to this comment and then paste it again by pressing Command-V.

    At the top of the results, there will be a line that begins with the words «Start time.» If you do not see that, but rather to see a mass of gibberish, you wait for the message "close this window". Please wait and try again.

    If personal information, such as your name or e-mail address, appear in the results, make anonymous before posting. Usually it will be not necessary.

    13. in the validation of the results, you see an error message on the web page: "you have included content in your post that is not allowed", or "the message contains invalid characters." It's a bug in the software which manages this website. Thanks for posting the results of the tests on Pastebin, then post here a link to the page you created.

    If you have an account on Pastebin, please do not select private in exposure menu to paste on the page, because no one else that you will be able to see it.

    14. This is a public forum and others can give you advice based on the results of the test. They speak for themselves, not for me. The test itself is harmless, but what're told you to do maybe not. For others who choose to run it, I do not recommend that you view the results of test on this Web site unless I ask.

    ______________________________________________________________

    Copyright © 2014, 2015 by Linc Davis. As the sole author of this work (including the "Test of diagnosis" referenced), I reserve all rights except as provided in the terms of use agreement for the site of Apple support communities ("CSA"). ASC readers can copy for their personal use. The whole nor any part can be redistributed.

  • a lot of programs at startup. Can I get rid of some of them while my computer will start more quickly?

    a lot of programs at startup. Can I get rid of some of them while my computer will start more quickly?

    To identify what loads when you start using Autoruns (freeware from Microsoft).

    http://www.Microsoft.com/technet/sysinternals/ProcessesAndThreads/Autoruns.mspx

    With Autoruns, you can deselect an item which disables startup, or you can click with the right button on an item, then remove it. If you clear the check box that you can check back for re - activate the element. It is an approach much safer than editing the registry and better than using msconfig.

    Another useful feature of the program is that you can click with the right button on an item and select search online to get information about the selected item.

  • In my address book, e-mail addresses are repeated over and more, as more than 100 times! What is the fastest way to remove them?

    Also, do you know why the rehearsals took place? Address are not ones I use, and I'm happy to remove them completely, but don't know how?

    Open "address book".
    Select the address book that contains the e-mail addresses, so that you can see them listed in the right pane of Contact.

    If you click on the "E-mail address" column heading, you can sort by e-mail address, so that all the email address are now listed one after the other.

    Left click on that to highlight the top
    'Shift' key and click the last one - everything else will be highlighted.
    Right-click on the highlighted email addresses and select 'delete '.

    How has it happened?
    Good question.
    You say that the relevant addresses are not ones I use.
    They are in the address book "collected addresses"?

    Please search to see if you have all the "Sent" saved messages seem to have used this email address in a 'TO' or 'Reply-to' field. ?

  • 10.11.3 iMac will not update more far - why?

    10.11.3 iMac will not update more far - why?

    What happens when you try.

    Have you tried to download and install this?

    Download update of OS X El Capitan 10.11.5 Combo

  • Recently updated iTunes and removed all my playlists and music. Is it possible to get them all back without re-download everything?

    Recently updated iTunes and removed all my playlists and music. Is it possible to get them all back without re-download everything?

    Turingtest2 CSA user help document: empty/corrupted iTunes after upgrade/crash library - https://discussions.apple.com/docs/DOC-6561

    If you do not see your content after updating to iTunes - https://support.apple.com/kb/HT203225

  • I've upgraded to a newer version of iTunes.  When I opened the new iTunes, all of these songs randomly appeared in my iTunes playlist!  I have NO idea where they came from.  Why they are on my computer, and how to remove them from my iTunes?

    I've upgraded to a newer version of iTunes.  When I opened the new iTunes, all of these songs randomly appeared in my iTunes playlist!  I have NO idea where they came from.  Why they are on my computer, and how to remove them from my iTunes?

    I think iTunes might be showing your iCloud music purchases. Go to the menu bar, and unselect display-> show iCloud music purchases.

  • iOS 9 and all its updates have ruined my iPhone and iPad. Now my iPhone works hurt more than my Galaxy 6 Edge. Best Apple he meet, or I won't spend more money with them!

    iOS 9 and all its updates have ruined my iPhone and iPad. Now my iPhone works hurt more than my Galaxy 6 Edge. Best Apple he meet, or I won't spend more money with them!

    If you have any questions, then explain your problem in detail and ask him.

  • Have two black stripes on the right and left of the screen making it my screen more small and does not know how to remove them permanently.

    Problem with the screen!  Have two black stripes on the right and left of the screen making it my screen more small and does not know how to remove them permanently.  Can someone help, please step by step details.  Thank you.  Have Windows7!

    Original title: screen

    Looks like a monitor / setting screen. Horizontal and vertical positions may need to be adjusted in the monitor buttons. Another possibility is that the display resolution is not optimal.

  • Why the gray dots appeared on my photos? What do mean? How can I remove them?

    I prepare a photo book and the images of my film have suddenly acquired a gray point.  I use OX 10.9.5 and LR 5.6.What what do mean? How can I remove them please?

    The points look like this:

    These points show that the captain has been added to the quick Collection.

    In the future, you'll probably get faster (and perhaps better) answers if you post in the main forum for LR: Photoshop Lightroom. This forum is intended for developers of plugins in LR.

  • Why my emails do not open when I'm selecting them to remove them?

    Use Ctrl to select several emails so that I can remove them then, they then all open! I don't want to open them, I want to just delete them?

    If it you freaks out for them to appear in the Message pane when you do this, press F8 to turn off the message pane when deleting in bulk. Not that there is a reason to panic, but it is an option for those of you that do.
    Press F8 to toggle the message pane when the lane is free, and you feel safe again.

  • I am running Xp SP2 Windows does not update anything more and gives me [error number: 0x8024400A] Why can't update Windows again?

    I am running Xp Sp2 and about a month, there are, I tried updating to SP3 (new) and it sends my computer fits in. It keeps just reboot and reboot (SP3 has always done this has my computer since its release). I had to do a cover of the plant to return to the place where he could start normally but now Windows does not update anything. I go to Windows Update, it goes through the motions of checking to see if everything is legitimate, click the express button and gives me "the website has encountered a problem and cannot display the page you are trying to view. The options provided below may help you solve the problem. [Error number: 0x8024400A]   After going through the links provided and find no solution the last link sent me here. So why can't update Windows?

    Hi kriplurr,

    Thank you for keeping us posted about the State of the question.
    I'm glad you are able to run the updates.
     
    You can download the Windows Installer under the following link and check.
    Windows Installer 3.1 v2 (3.1.4000.2435) is available
     
    Or you can download it directly at the following link.
    (a) click on the above link.
    (b) click Download next to WindowsInstaller-KB893803-v2 - x 86-.exe
    (c) install and check.
     
    Hope this information helps.
  • I compacted my messages. Messages from 17/01/2012 to 01/04/2012 are not in my Inbox and I didn't remove them where are?

    Out Look express

    I compacted my messages. Messages from 17/01/2012 to 01/04/2012 are not in my Inbox and I didn't remove them where are?
    Two reasons the most common for what you describe is disruption of the compacting process, (never touch anything until it's finished), or bloated folders. More about that below.
     
    Why OE insists on compacting folders when I close it? :
    http://www.insideoe.com/FAQs/why.htm#compact
     
    Why mail disappears:
    http://www.insideoe.com/problems/bugs.htm#mailgone
     
    Recovery methods:
     
    If you are running XP/SP3, then you should have a backup of your dbx files in the Recycle Bin (or possibly the message store), copied as bak files.
     
    To restore a folder bak on the message store folder, first find the location of the message store.
     
    Tools | Options | Maintenance | Store folder will reveal the location of your Outlook Express files. Note the location and navigate on it in Explorer Windows or, copy and paste in start | Run.
     
    In Windows XP, the .dbx files are by default marked as hidden. To view these files in the Solution Explorer, you must enable Show hidden files and folders under start | Control Panel | Folder options | View.
     
    Close OE and in Windows Explorer, click on the dbx to the file missing or empty file, then drag it to the desktop. It can be deleted later once you have successfully restored the bak file. Minimize the message store.
     
    Open OE and, if the folder is missing, create a folder with the * exact * same name as the bak file you want to restore but without the .bak. For example: If the file is Saved.bak, the new folder should be named saved. Open the new folder, and then close OE. If the folder is there, but just empty, continue to the next step.
     
    First of all, check if there is a bak file already in the message. If there is, and you have removed the dbx file, go ahead and rename it in dbx.
     
    If it is not already in the message, open the trash and do a right-click on the file bak for the folder in question and click on restore. Open the message store up and replace the .bak by .dbx file extension. Close the message store and open OE. Messages must be in the folder.
     
    If messages are restored successfully, you can go ahead and delete the old dbx file that you moved to the desktop.
     
    If you have not then bak copies of your dbx files in the Recycle Bin:
     
    DBXpress run in extract disc Mode is the best chance to recover messages:
    http://www.oehelp.com/DBXpress/default.aspx
     
     
    A general warning to help avoid this in the future:
     
    Do not archive mail in default OE folders. They finally are damaged. Create your own folders defined by the user for mail storage and move your mail to them. Empty the deleted items folder regularly. Keep user created folders under 300 MB, and also empty as is possible to default folders.
     
    Disable analysis in your e-mail anti-virus program. It is a redundant layer of protection that devours the CPUs, slows down sending and receiving and causes a multitude of problems such as time-outs, account setting changes and has even been responsible for the loss of messages. Your up-to-date A / V program will continue to protect you sufficiently. For more information, see:

    http://www.oehelp.com/OETips.aspx#3 
     
    And backup often.
     
    Outlook Express Quick Backup (OEQB Freeware)
    http://www.oehelp.com/OEBackup/default.aspx  

Maybe you are looking for