Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How does sys.gv_$transaction.used_urec give an idea on the progress of an update or delete?

BEDEOct 11 2024 — edited Oct 11 2024

So, I run:

select s.inst_id, s.sid, s.serial#, s.username, s.osuser, t.used_urec used_undo_record,
t.used_ublk used_undo_blocks, s.sql_id
from sys.gv_$session s
join sys.gv_$transaction t on s.saddr=t.ses_addr and s.inst_id=t.inst_id
order by t.used_urec desc
;

And, for a session that I know performs an update and has to update some 12M rows I get for user_urec a value that exceeds by much that 12M… What am I to understand?

Could I possibly have an estimate what % of the rows to be updated (which I got by running a select count(*) which ran in a couple of seconds) have actually been updated. I must mention it is a database used for database warehousing so that there hardly are several ongoing transactions on the same table.

What is the actual meaning of that used_urec? How is that calculated? For it certainly is not equal to the number of rows updated or deleted in case of an update or delete.

Comments
Post Details
Added on Oct 11 2024
4 comments
233 views