How to make an update command efficient, "it is urgent"

i have a table with with 891350 records, and the other table also have the same number or records, i have indexed both tables, and used this query to update the table,
UPDATE tt A SET (A.SUBURB_FORM, A.DATASET_FORM, A.STATE_FORM)= (SELECT B.SUBURB, B.DATASET, B.STATE FROM bb B
WHERE A.IDX=B.IDX AND B.STATE <>'XXX')
WHERE EXISTS (SELECT NULL FROM bb C
WHERE A.IDX=C.IDX AND C.STATE <>'XXX')
tables are indexed on bases of idx, after 24 hours still it process, i think there might be some problem as before it was not taking that much long. please can anybody help to identify the issue.
Thanks

Try:
update (select A.SUBURB_FORM a_suburb, A.DATASET_FORM a_dataset,
        A.STATE_FORM a_state, B.SUBURB b_suburb, B.DATASET b_dataset,
        B.STATE b_state
        FROM tt A, bb B
        WHERE A.IDX=B.IDX AND B.STATE <>'XXX')
set a_suburb=b_suburb, a_dataset=b_dataset, a_state=b_state;Also check you're not locked while updating.

Similar Messages

  • How to make an update command efficient

    i have a table with with 891350 records, and the other table also have the same number or records, i have indexed both tables, and used this query to update the table,
    UPDATE tt A SET (A.SUBURB_FORM, A.DATASET_FORM, A.STATE_FORM)= (SELECT B.SUBURB, B.DATASET, B.STATE FROM bb B
    WHERE A.IDX=B.IDX AND B.STATE <>'XXX')
    WHERE EXISTS (SELECT NULL FROM bb C
    WHERE A.IDX=C.IDX AND C.STATE <>'XXX')
    tables are indexed on bases of idx, after 24 hours still it process, i think there might be some problem as before it was not taking that much long. please can anybody help to identify the issue.
    Thanks

    Prior to update, disable your indexes, After done!,
    you just enable them.
    hare krishna
    AlokI beg to defer with you. Disabling/enabling means you will be rebuilding indexes, which means you will be opening can of worms ;-)
    If the OP has downtime then easiest way is CTAS a new table, truncate the original table and populate using insert command along with the update changes with nologging option.
    Regards,
    Satheesh Babu.S

  • HOW TO MAKE AN UPDATE COMMAND MORE EFFICIENT

    hI Everyone,
    if we have round (10000000) records in a table and we want to update an attribute in this table. it takes sometime round 60 mins or even more, while both tables are indexed. Do anyone knows any magic to improve the efficiency.
    Best Regards,

    If you are using IN clause, try using exists.
    AdinathWhy?
    look at this
    1) NOT IN vs NOT EXISTS:
    /*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*/
    /*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*/
      select *
        from dept
       where deptno not in (
                             select deptno
                               from emp
                              where deptno is not null
      Statement Id=12200   Type=
      Cost=2,64022111505165E-308  TimeStamp=03-05-07::13::40:08
           (1)  SELECT STATEMENT  ALL_ROWS
         Est. Rows: 1  Cost: 6
           (6)  MERGE JOIN ANTI
         Est. Rows: 1  Cost: 6
               (3)  TABLE TABLE ACCESS BY INDEX ROWID SCOTT.DEPT  [Analyzed]
               (3)   Blocks: 5 Est. Rows: 4 of 4  Cost: 2
                    Tablespace: USERS
                   (2)  INDEX (UNIQUE) INDEX FULL SCAN SCOTT.PK_DEPT  [Analyzed]
                        Est. Rows: 4  Cost: 1
               (5)  SORT UNIQUE
                    Est. Rows: 14  Cost: 4
                   (4)  TABLE TABLE ACCESS FULL SCOTT.EMP  [Analyzed]
                   (4)   Blocks: 5 Est. Rows: 14 of 14  Cost: 3
                        Tablespace: USERS
    /*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*/
    /*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*/
      select *
        from dept
       where not exists (
                          select null
                            from emp
                           where emp.deptno is not null
                             and emp.deptno = dept.deptno
      Statement Id=100   Type=
      Cost=1,95696055847079E-307  TimeStamp=03-05-07::13::42:35
           (1)  SELECT STATEMENT  ALL_ROWS
         Est. Rows: 1  Cost: 6
           (6)  MERGE JOIN ANTI
         Est. Rows: 1  Cost: 6
               (3)  TABLE TABLE ACCESS BY INDEX ROWID SCOTT.DEPT  [Analyzed]
               (3)   Blocks: 5 Est. Rows: 4 of 4  Cost: 2
                    Tablespace: USERS
                   (2)  INDEX (UNIQUE) INDEX FULL SCAN SCOTT.PK_DEPT  [Analyzed]
                        Est. Rows: 4  Cost: 1
               (5)  SORT UNIQUE
                    Est. Rows: 14  Cost: 4
                   (4)  TABLE TABLE ACCESS FULL SCOTT.EMP  [Analyzed]
                   (4)   Blocks: 5 Est. Rows: 14 of 14  Cost: 3
                        Tablespace: USERS
    /*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*/
    /*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*/2) IN vs EXISTS
    /*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*/
    /*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*/
      select *
        from dept
       where exists (
                      select null
                        from emp
                       where emp.deptno is not null
                         and emp.deptno = dept.deptno
      Statement Id=100   Type=
      Cost=1,9569605606389E-307  TimeStamp=03-05-07::13::43:15
           (1)  SELECT STATEMENT  ALL_ROWS
         Est. Rows: 3  Cost: 7
           (4)  HASH JOIN SEMI
         Est. Rows: 3  Cost: 7
               (2)  TABLE TABLE ACCESS FULL SCOTT.DEPT  [Analyzed]
               (2)   Blocks: 5 Est. Rows: 4 of 4  Cost: 3
                    Tablespace: USERS
               (3)  TABLE TABLE ACCESS FULL SCOTT.EMP  [Analyzed]
               (3)   Blocks: 5 Est. Rows: 14 of 14  Cost: 3
                    Tablespace: USERS
    /*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*/
    /*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*/
      select *
        from dept
       where deptno in (
                         select emp.deptno
                           from emp
                          where emp.deptno is not null
      Statement Id=4203132   Type=
      Cost=2,64022111505165E-308  TimeStamp=03-05-07::13::44:16
           (1)  SELECT STATEMENT  ALL_ROWS
         Est. Rows: 3  Cost: 7
           (4)  HASH JOIN SEMI
         Est. Rows: 3  Cost: 7
               (2)  TABLE TABLE ACCESS FULL SCOTT.DEPT  [Analyzed]
               (2)   Blocks: 5 Est. Rows: 4 of 4  Cost: 3
                    Tablespace: USERS
               (3)  TABLE TABLE ACCESS FULL SCOTT.EMP  [Analyzed]
               (3)   Blocks: 5 Est. Rows: 14 of 14  Cost: 3
                    Tablespace: USERS

  • How to make system update with "use automatic configuration script" and an URL

    Hello,
    all our laptop using "use automatic configuration script" with an "accelerated_pac_base.pac" prxy setting.
    How can we make system update work with that ?
    And no way for us to by pass this proxy settings with
    Thanks

    I mean there is no general method which is capable of correcting all possible errors found by schema validation.
    For example if the validation says it expected to find an <organization> element or a <company> element but it found a <banana> element, there is no way to determine what repair is necessary.
    Anyway the requirement is fighting against the way things work in the real world. The purpose of validation is just to find out whether a document matches a schema. If it doesn't, then too bad. Send it back to be fixed or replaced. If you are having a problem because you repeatedly get documents which don't quite match your schema, then you need to train the users to produce valid documents or to give them tools which help them do that.

  • How to make live update stuff...

    HI, everyone..
    I would like to make the program for Live Update stuff like AntiVirus Norton.
    Please Let me know how to make it, and Could anybody tell me about algorithm of it?
    I have no idea how to do...
    Thank you...
    God bless you..

    I'm not sure whether you want, like, more elegant solution than this, but here it is:
    1. Make user execute your 'LiveUpdate' program.
    2. Make the program talk to your server or (if you don't have a server) CGI script using Networking API
    i.e. You can have a custom CGI script on Tripod.3. Determine whether there is an update
    4. If there is an update, download!

  • How to make an update in adobe player uppod.

    Player pack is inserted into the site http://like-film.ru . Help how to do automatic update to this site.

    Hi,
    I'm not sure I understand exactly, however, if you're saying that Flash Player installer is downloading from http://like-film.ru then it's not an official Flash Player download.  If this is not what you mean, please clarify and we'll try to help you.
    Maria

  • How to make this kind of mouseover?? URGENT!!

    Please PROFESSIONAL help me T^T
    URGENT for this T^T
    http://superjunior.smtown.com/
    I want to know how to make that kind of mouseover ^^
    Hope PROFESSIONAL can teach me ^^
    http://starimg.smtown.com/superjunior/version04/site/images/main_navi.swf

    Hi, I don't know what program you are using, but perhaps the Flash forum would be helpful. This is the Flash Player forum . You could also check the other Adobe Forums that would be for your Adobe program.
    Thanks,
    eidnolb

  • How to make Library Update work with XFL format

    Hi, all. When you keep your Flash file as a fla, it remembers where bitmap and audio files were so that if you edit the original file you can easily pull in that update by selecting the library icon, right-clicking, and selecting "Update." However, when you use xfl, that gets broken. I think the theory is that you are supposed to be able to dig through the library folder and be able to update the file there. However, in the case of audio files, there's not actually anything in the library directory, so you can't really do that.
    Is there a way that I'm missing to let you easily update bitmap and audio library assets with xfl? Is there a setting somewhere I should be setting that would enable my library assets to "remember" where they were imported from after the file is closed and reopened?  Note that I'm still on cs5.5 for the most part, because I feel like it's more stable than CS6 and definitely more stable than the CC versions, but I have also had this problem in CS6.

    "However, in the case of audio files, there's not actually anything in the library directory, so you can't really do that."
    I don`t remember how xfl was handled in older versions, but in CC the LIBRARY folder that you see inside your XFL File is an exact mirror of the LIBRARY Folder that can be found on your HD where the xfl file is located.
    So any Sound that you imported in your xfl file will be copied to that specific folder. And updating that file will automatically update it in your LIBRARY, so there is actually no need anymore to "update" your assets via the context command.
    (Windows 7-64bit)

  • HOW TO MAKE ITEM UPDATABLE/NON-UPDATABLE DYNAMICALLY

    Hi ,
    I have a form with tabular layout on a multi record lock .
    From shows 20 records at a time and there is a scroll bar to scroll down .There is an item "flag" in the block which is not visible in the form with values "Y" or "N" .
    I need to make some text items in the record updatable when that record has "flag" ="Y" .Documentation say's we need to use set_item_instance_property to do that .
    I tried it in when-new-record-instance,pre-query and key-exeqry triggers with no luck .
    I would really appreciate if you could give me the following info
    1) How to loop through each record in a block to check value of "flag"
    2) Which trigger to use and level form,block etc .
    Thanks,

    Ram,
    Thanks for the update . Now it works . Another problem though ...
    My form displays 20 records at a time and I have a scroll bar .
    I need to change the background of Item to white when it is updatable and gary when it is not updatable .
    I've created a visual attribute and was using it with set_item_instance_property like this ..
    declare
    last_rec number;
    begin
    last_record;
    last_rec := :system.cursor_record;
    first_record;
    for i in 1 .. last_rec
    loop
    if :ANNUAL_FUNDS.flag != 'Y' then
    begin
    Set_Item_Instance_Property( 'EXP_FUNDS', CURRENT_RECORD, UPDATE_ALLOWED , PROPERTY_FALSE);
    Set_Item_Instance_Property( 'EXP_FUNDS', CURRENT_RECORD, VISUAL_ATTRIBUTE, 'VI_UPDATE');
    end;
    end if;
    if :system.last_record = 'TRUE' or i = last_rec then
    exit;
    else
    next_record;
    end if;
    end loop;
    FIRST_RECORD;
    end;
    When I took out the loop the way you've mentioned
    it's changing the background color of the item for the record in which cursor is in . Users want to look at the screen in a glance and go directly to the item which is updatable .
    Is there any way we can loop through all records once and change properties in one shot ?
    Sorry to bother you,
    Asha

  • How to make an update of millions of rows using only one commit statement?

    Hi, I need to execute a complex update statement over a partitioned table. I take advantage of partitioning: loop for each partition, do the update and make commit. Of that way I'm updating and then commiting around 600.000 rows.
    But some of our systems have Oracle Standar Edition version and partitioning is not supported. I want to make the same update without taking advantage of partitioning. That is my problem. I need to update around 15.000.000 of rows but if I try to make commit at the end, this update generates a lot of UNDO data and fails because there is not enought space for retention.
    I would like to know your suggestions. There is some way of avoid UNDO data generation? There is some way to execute commit automatically?
    Thanks for your support.

    >
    This is exactly what I was looking for. Its a shame is only available in 11.2.
    >
    Then you may be interested in 'Do-It-Yourself Parallelism' for your 10g version to accomplish the same thing very effectivelyl.
    See the 'Do-It-Yourself Parallelism' section of this article by Tom Kyte.
    http://www.oracle.com/technetwork/issue-archive/2009/09-nov/o69asktom-089919.html
    >
    In my book Expert Oracle Database Architecture , I spent quite a few pages describing how to perform batch operations “in parallel,” using a do-it-yourself parallelism approach. The approach was to break up a table into ranges, using rowids (see www.bit.ly/jRysl for an overview) or primary key ranges (see “Splitting Up a Large Table”). Although the approach I described was rather straightforward, it was always also rather manual. You had to take my “technique” and tweak it for your specific circumstances.
    >
    You really should get the book since it has ALL of the details. But the above quote has a link to that "Splitting Up a Large Table" doc and that doc shows how to do it.,
    http://www.oracle.com/technetwork/issue-archive/2006/06-jan/o16asktom-101983.html
    >
    Splitting Up a Large Table
    I would like to partition a range of values into balanced sets. Initially I figured that one of the analytics functions might be useful for this and decided to look into these and learn more about them. The question I had in mind was, "For an ordered list of values, how can we 'chop' them into ranges and then list the first and last value for each range?"

  • Form function security (how to make form Updatable)

    Hi...friends...
    I have one standard oracle form. Data of that form is updatable in 11.5.7 instances...I can insert,update and delete.
    But, we had upgraded Apps to 11.5.10...so, now the same form data is not updatable..I can insert, but cant delete or update...
    So, is there any thing like form function security attached with that form or responsibilities in previous version... which are not in new 11.5.10 ??
    How can I make that form contents updatable through Sys. Admin. concept.
    (not through Form Builder Design)
    Thanks in advance....

    Thank you guys..
    actually, it was a bug with 11.5.7 oracle versions specific to one check box value.
    it was treating check box values as,
    i) checked then 'Y
    ii) Null then 'Null' ------- the problem was here...due to null, query was not fetching data and that form is having flag which understands only 'Y' or 'N'
    iii) not checked then 'N'
    anyway thanks to u all...

  • How to make small updates to a website

    Hi all,
    Let's say you make a website and then realize that you want to add or adjust just one of the photos in it. LR will need to remake the entire site from
    scratch (slow if you have a lot of photos in it). PS on the other hand has always been very clever about just adding or updating the site to include the new or changed photo. Is there a trick to get LR to be this clever?
    thanks for any thoughts on this,
    foster

    > Yes, I see your point about it not being intended for managing sites etc.
    > I'm just not sure how to use the website module effectively.
    > My workflow before LR was to do all my adjustments in nikon-capture or PS
    > and then export everything to jpg. And then I'd get PS to make my website
    > collections of images from those jpg files. I was hoping that with LR, I
    > could avoid doing a separate export of everything to jpg.
    Yes, you can use LR to upload directly to the website, but neither PS nor LR
    are website management applications, so you will probably want to add such
    an application to your workflow. I use Dreamweaver, but others will work.
    It is common practice to have a copy of your entire website on your local
    machine. Using that model, you could use LR to create the web collection
    and copy to the folder in the local machine (just set the destination folder
    to the local copy of the web site). Then use your web application to a)
    link the new collection to the rest of the website, and b) sync the local
    copy with the online website, which will upload all new files. If you later
    decide to modify a single photo, then sync again using the web management
    application. Of course, that's just one possible solution, but any good
    solution will likely include a web management application.
    Best,
    Christopher

  • How to make New Folder command available as No as the default value for document libraries

    Hi, is there a way to make this option as No as the default value instead of Yes, for all new document libraries? Perhaps with a powershell command for an entire site collection?

    Hi Cartin,
    I would suggest to create a library template of an empty library with this settings as NO. Use this template for creating new libraries.
    For updating existing libraries you can use:
    $Site = Get-SPSite http://Site
    $ListName = "library Name"
    $Site | Get-SPWeb | ForEach-Object {
    $List = $_.Lists[$listName]
    $List.EnableFolderCreation = $false
    $List.Update()
    $Site.Dispose()
    You can modify the above script for you need.

  • How to make the print command wait until form is rendered.

    This is an ongoing issue that so far I haven't been able to figure out how to fix, so I'm hoping that someone will have a good idea or work around. I'm working in LiveCycle Designer ES v8. using JavaScript.
    I have to include a feature that allows the user the choice to print out a dynamic form to fill out by hand. So I've created a button that asks if this is what they want to do, if they answer "Yes", then several things are scripted to happen. All data is reset, some subforms and pages are made visible, while other subforms are hidden, and text fields are expanded. This causes the form to expand from one page to 15 pages. Then it prints using this command:
              xfa.host.print(1,   
    "0", (xfa.host.numPages -1).toString(), 0, 1, 0, 0, 0);
    The problem is that when the print dialogue box appears, the Print Range is always set to less than the total number of pages. It looks like that the print commands fires before the form has completed rendering. This isn't a big deal since the user can click to set the Print Range to "All" which will print all 15 pages. The problem is that most people don't read the dialogue box. They click "okay" and end up with their form cut off.  Then I get phone calls that my form doesn't work.
    Is there anyway to delay the print command until everything has finished rendering? Or set the Print Range to always go to "All"?
    Thanks in advance for your help with this.

    It sounds like you'd be fine if you just separated the print function from your "Yes" button. It will require a 2nd button click from the user but that would be the only inconvenience.

  • How to make inline format command carry over to subsequent pages

    Using Designer 5.7.  Using inline formatting in the data file (\b. \b0.) to make part of the text bold (Example: bold text bold text regular text).  The problem occurs when the end of page is reached.  The text flows to the next page and if the text is split across pages after the bold command was turned on but before it is turned off, the text at the top of the new page is not formatted.
    Example of Bottom of Page 1:     This is an example of the text at the bottom of page one.  This text is supposed to be
    Example of Top of Page 2:            all bold but the end of page commands cause the bold command to be "forgotten".
    Using 1 line subform and an identical overflow subform formatted to reserve space and a Switchpage override in in the Preamble.
    It's not feasible to use a field formatted for bold and also be able to determine when it should be used during document generation since the text may be variable in length.  Any information is appreciated.

    For the time being, I can only respond to Pages for iOS. OS X I'll need to check when I get home (or perhaps someone else will beat me to it). You may wish to post in the Pages for Mac forum for better exposure.
    In Pages for iOS you are limited to a single header and footer. There is no Section structure so no way to do different headers/Footers for different pages (as you can do in MS word for example). To modify the Header and insert the text you want: Tap the Tools icon (wrench in upper right), then Document Set up. Tap in the header field, then tap and hold to use the menu to insert pages numbers, then type the text you need.
    Quite possibly. Check the app store. Or you may be able to set this up in Pages for OS X and import it into Pages on the iPad. I'm not certain the sections will import however.
    Also consider using a different app, such as word for iOS or any of the numerous other word processing apps available.

Maybe you are looking for

  • How to reinstall itunes on Yosemite

    Hello, My MacBook Pro runs Yosemite 10.10.1 My current iTunes version is 12.0.0.140 iTunes installation is by default, I made no particular changes to it. My App Store application is 2.0 (376.0.5) and tells me there is a iTunes 12.0.1 upgrade availab

  • Certain Audio Not Working

    I got this macbook in late December and starting a few days ago certain audio won't work. The noise when you empty the trash can, or the noise when you can't click doesn't go off, when using photobooth it'll count down but the shutter won't go off. I

  • Select..... from table...... having max date

    I'm trying to select the row from a table that has the maximum date. For example, lets say I want the name of the most recently created object in dba_objects. I can do this using a sub-query, but surely there must be an easier way, and querying this

  • Oracle 8i OPS

    I'm in the process of building a two node cluster on Sun Netra 1405s with Sun Cluster 3.0 and using Veritas 3.11. The cluster is up and running properly and I've built a shared disk group successfully. I encounter problems when I install the Sun Clus

  • Streaming via Ipod Touch  + Safari

    I just went to NPR via my IPT and attempted to listen to Morning Edition via their stream. Of course neither real player or windoes medi player are on the IPT. Any ideals on how to do this? or is this just a case of Apple loading in a Real Player wid