DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Big dups Update

  1. #1
    Join Date
    Aug 2000
    Location
    Ny
    Posts
    105

    Angry

    I have a table have about 2,000,000 records in it and I need to update the column SEC_FLAG with 'Y' for all the duplicate values of IP, NAME, DATE_CLICK. I tryed this query, i tryed using collections in pl/sql, but it takes very very long time, any ideas or suggestions?

    Thanks.

    UPDATE MY_TABLE a SET
    a.sec_flag = 'Y'
    WHERE a.ROWID >
    (SELECT MIN(b.ROWID)
    FROM MY_TABLE b
    WHERE a.ip = b.ip AND
    a.name = b.name AND
    a.date_click = b.date_click);



  2. #2
    Join Date
    Feb 2001
    Posts
    184
    This can be resolved by having Indexes on those columns that are appearing in the Where clause.. Even once the Update is done you can drop those indexes.

    This will increae the performance for the update.

    I have tried and it's very very fast.

    Thanks.

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