How is a table UPDATE handled by a RDBMS? How is a table UPDATE handled by a RDBMS? oracle oracle

How is a table UPDATE handled by a RDBMS?


From: http://jonathanlewis.wordpress.com/2006/11/22/tuning-updates/

"If Oracle uses a (B-tree) index to find the data to be updated, it postpones any (B-tree) index updates needed until the end of the update, then sorts the index keys (with their rowids) for the before and after values before applying bulk updates to the indexes"

If you did a detailed trace, the wait events show the file/block details for IO. From there it should be possible to determine the object (using DBA_EXTENTS) and so the order in which things are accessed.

That said, it is pretty academic and shouldn't affect how you code things.


To see the execution plan for your particular update statement:

  1. Turn on tracing for your session
  2. Run your PL/SQL
  3. run tkprof on the trace file