Results 1 to 3 of 3

Thread: UPDATE statement performance

  1. #1
    Join Date
    Jan 2010
    Posts
    2

    UPDATE statement performance

    Is there any better way of writing the following UPDATE statement?

    DML statement:
    UPDATE mytable SET obj_path = 80 WHERE obj_volumeid = 3 and obj_itemid LIKE 'A#%' AND obj_collectionid = 2 AND obj_path = 1;

    Note:
    1.The table has no partitions.
    2.The table has >30 million rows.
    3. The script has hundres of similar update statements with different values for obj_path, obj_volumeid, obj_itemid, obj_collectionid columns in mytable.

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    Check if you can use FORALL loop. If should be possible if the parameters you pass can be generated based on loop counter.

  3. #3
    Join Date
    Jan 2010
    Posts
    2
    Yes, FORALL loop works fine.

    Thanks a bunch!

Posting Permissions

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