Half a million update statements?! Yikes.
To be honest, I don't understand what you're trying to do. Other than "update some rows".
Where exactly do the hardcoded values come from? How do they get from the client to your code? What exactly does your code look like now?
The more PL/SQL architecture I have to build, I feel the less likely it is to provide any gain.This is unlikely. If you can replace the 500,000+ updates with a single FORALL update you'll get substantial performance gains.
For example, you can create arrays for the new values and set them for each like so:
declare
ids dbms_sql.number_table;
v2s dbms_sql.number_table;
v3s dbms_sql.number_table;
begin
for i in 1 .. <half a million?!> loop
ids ( i ) := i;
v2s ( i ) := <value>;
v3s ( i ) := <value>;
end loop;
forall rws in 1 .. ids.last
update t
set c2 = v2s ( rws ), c3 = = v2s ( rws )
where c1 = ids ( rws );
end;
/
Of course, this assumes you can't replace all the separate updates with just one that updates thousands of rows. This is likely to be fastest of all.