sql - Best approach for Oracle database mass update -


i need mass update of table (~30,000 records) in oracle 10g database. challenge there no "where" clause can select target rows. each target row can, however, identified via composite key. catch here list of composite keys external source (not in database).

currently have java program loops through list of composite keys , spits out pl/sql procedure bunch of repeated update statements similar following:

update table1 t set myfield='updated' t.comp_key1='12345' , t.comp_key2='98765'; 

is there better way this, or "good enough" considering we're dealing ~30k records?

good enough.

30,000 updates using primary key, if hard-parsed, take few seconds. speed things combining updates, @ed gibbs suggested. far looks quick process isn't worth optimizing. putting in single pl/sql procedure smart move, , saved 99% of time needed naive, row-by-row-from-the-client solution.


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -