Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> performance issue - mass updates

performance issue - mass updates

From: niz <niz_at_infidel.freeserve.co.uk>
Date: 7 Nov 2005 06:37:41 -0800
Message-ID: <1131374260.970937.194120@g43g2000cwa.googlegroups.com>


i have a table containing ~ 100000 rows. it has triggers, contraints etc.
i want to update a single field in ~ 40000 of those rows.

currently i'm using the following sqlplus (not plsql):

UPDATE table SET field2 = date_value WHERE field1 = 9130 and field3 in (1190, 1191, 1192, 1193);
UPDATE table SET field2 = date_value WHERE field1 = 9131 and field3 in (1190, 1191, 1192, 1193);
UPDATE table SET field2 = date_value WHERE field1 = 9131 and field3 in (1190, 1191, 1192, 1193);
.
.
.

<etc 40000 times>
.
.
.

field1 is an indexed unique primary key (integer). the 40,000 update statements are currently generated via SQL from the same table.

this is proving very slow - over 2 hours runtime. what are the obvious ways to speed things up? i am under constraints where i cannot change the structure of the table (e.g. adding new indexes or partitioning). current development standards also recommend sticking with DML only, not committing, and specifying only one exact seqnum for each update.

what can be done to speed things up? will multiple commits help? would a single update, instead of 40000 individual ones, help? how much difference would removing the field3 clause make? currently "date_value" is actually a macro-substituted value (using &). does it make a significant difference? would plsql help (obviously it would be too big for a single plsql block).

any ideas???

thanks.

--
reply to group
Received on Mon Nov 07 2005 - 08:37:41 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US