any updates on update opp.?
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 8 of 8

Thread: any updates on update opp.?

  1. #1
    Join Date
    May 2003
    Location
    Pretoria, Rep of South Africa
    Posts
    191

    any updates on update opp.?

    I'm updating two columns in a table with two existing columns in the table....reason:I have to switch the TYPE from varchar2 to number

    The count on the rows is approc. 160 000. I started the update almost 2hours ago and it is still running. Is there a better/faster procedure to do mass updates on rows.

    I'm using plsql developer...update t1 set col1=col2;
    Able was I ere I saw Elba

  2. #2
    Join Date
    Dec 2002
    Location
    Bangalore ( India )
    Posts
    2,434
    Use Merge
    funky...

    "I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."

    "Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"

  3. #3
    Join Date
    May 2003
    Location
    Pretoria, Rep of South Africa
    Posts
    191
    ALTER TRIGGER "my_triggername_ontable_insert/update/delete" disable; before the UPDATE.

    Time saved=priceless.

    Thanks for the tip on merge.
    Able was I ere I saw Elba

  4. #4
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253

    Re: any updates on update opp.?

    Originally posted by robertbalmer
    I'm updating two columns in a table with two existing columns in the table....reason:I have to switch the TYPE from varchar2 to number

    The count on the rows is approc. 160 000. I started the update almost 2hours ago and it is still running. Is there a better/faster procedure to do mass updates on rows.

    I'm using plsql developer...update t1 set col1=col2;
    You are updating both columns in the same pass, aren't you? Your code fragment suggests you might not be.

    you'd want to ...
    Code:
    Update
       My_Table
    Set
       col1 = col2,
       col3= col4;
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  5. #5
    Join Date
    Jul 2003
    Location
    Sofia, Bulgaria
    Posts
    91
    Originally posted by abhaysk
    Use Merge
    abhaysk what you mean here? I could not find nothing in the documentation about it?

  6. #6
    Join Date
    Dec 2002
    Location
    Bangalore ( India )
    Posts
    2,434
    Originally posted by stancho
    abhaysk what you mean here? I could not find nothing in the documentation about it?
    I guess u searched docs < 9.x ?

    herez the link MERGE

    Abhay.
    funky...

    "I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."

    "Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"

  7. #7
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    I don't think the merge operation is relevant to this question.
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  8. #8
    Join Date
    Dec 2002
    Location
    Bangalore ( India )
    Posts
    2,434
    Why not

    Its much faster than lagecy Update Statement.
    It depends how you might want to use

    Ok, original poster didnt mention he had Triggers on the table for UPDATE.
    funky...

    "I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."

    "Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width