Alternatives to using update to flag rows of data
561583Apr 4 2007 — edited Apr 4 2007Hello
I'm looking into finding ways of improving the speed of a process, primarily by avoiding the use of an update statement to flag a row in a table.
The problem with flagging the row is that the table has millions of rows in it.
The logic is a bit like this,
Set flag_field to 'F' for all rows in table. (e.g 104million rows updated)
for a set of rules loop around this
Get all rows that satisfy criteria for a processing rule. (200000 rows found)
Process the rows collected data (200000 rows processed)
Set flag_field to 'T' for those rows processed (200000 rows updated)
end loop
Once a row in the table has been processed it shouldn't be collected as part of any criteria of another rule further down the list, hence it needs to be flagged so that it doesn't get picked up again.
With there being millions of rows in the table and sometimes rules only processing 200k rows, i've learnt recently that this will create a lot of undo to be written and will thus take a long amount of time. (any thoughts on that)
Can anyone suggest anything other then using an update statement to flag each row to avoid it being processed again?
Appreciate the help