Oracle updating records within same cursor mogen dating i stockholm
The ROWID variable can improve PL/SQL programs that retrieve records from the database, perform manipulation on the column values, and then complete with an UPDATE to the retrieved record.
When retrieving each record, the ROWID can be added to the selected column list.
This involves adding the ROWID in the SELECT statement and changing the UPDATE predicate clause.
The following output shows the timing of two executions of the preceding code segment: As evidenced from the timings, execution is faster using the ROWID.
The array size you pick will depend on the width of the rows you are returning and the amount of memory you are happy to use.