Results 1 to 4 of 4

Thread: Smart Update

  1. #1
    Join Date
    Jul 2003
    Posts
    38

    Unanswered: Smart Update

    Hi,
    We are having a huge data in one of our ( nearly 1.6 to 1.8 Crore) table. Now we want to execute some trim update in one of the columns in that table to reduce the space. Is there any SMART way of updating this? Otherthan doing the update in a loop with commit frequency??? Please update us with your ideas....asap.

    Awaiting...

    thnx.
    avr.

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    I've heard of a "lakh" before (Indian for 100,000), but what is a "crore"?

    Anyway, for such a huge update probably the best bet is to copy table table using "CTAS" (Create Table As Select):

    create table mytab_new
    as select a, b, c, trim(d)
    from mytab;

    drop table mytab;

    rename mytab_new to mytab;

    Then of course reinstate any indexes, constraints, triggers etc.

  3. #3
    Join Date
    Jul 2003
    Posts
    38
    Hi ..

    Thankyou very much for your suggestion. We will try that.
    Just FYI....1 Crore = 10 million

    Thanks & regards,
    avr.

  4. #4
    Join Date
    Jul 2003
    Posts
    2,296
    yeah cause saying "16 mil" is too difficult

    anyways, I agree with Andrew but also consider creating the table with
    nologging and inserting with a APPEND hint. Should be faster.

    soemthing like:
    PHP Code:
    create table mytab_new NOLOGGING
    as select /*+ APPEND */ 
    abctrim(d)
    from mytab
    - The_Duck
    you can lead someone to something but they will never learn anything ...

Posting Permissions

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