Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Undo Generation
I believe you are using 10g.
There's an optimisation for undo and redo in 10g which aims to minimise the number of records (vectors for redo) on array processing.
For inserts, all inserts made at the same time to a single block can be packed into a undo record (ditto redo vector).
For delete, every row deleted has to generate a separate undo record (redo vector).
For updates there is an odd mix (which may also be true for inserts, except that I haven't looked closely enough). The number of undo records can be between 1 and the number of rows updated. I think this depends on the number of rows which can be updated 'in situ' - so your 9 suggests that several rows had to be transferred into the block free space for the update to take place. If you had done
set sal = sal + 1
you may have found fewer undo records.
(I guess I ought to test whether an insert that causes deleted rows to be cleared out and the free space to be coalesced results in many more undo records, or just one or two extra - or maybe one per deleted row cleared).
Regards
Jonathan Lewis
http://jonathanlewis.wordpress.com
Author: Cost Based Oracle: Fundamentals
http://www.jlcomp.demon.co.uk/cbo_book/ind_book.html
The Co-operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html
![]() |
![]() |