Friday, August 26, 2011

Difference between Chaining and Migration of a row

 It occurs when the row is too large to fit into one data block when it is first
 inserted. In this case, Oracle stores the data for the row in a chain of data
 blocks (one or more) reserved for that segment. Row chaining most often occurs with large rows, such as rows that contain a column of datatype LONG, LONG RAW, LOB, etc. Row chaining in these cases is unavoidable.

 It occurs when a row that originally fitted into one data block is updated so
 that the overall row length increases, and the block's free space is already
 completely filled.  In this case, Oracle migrates the data for the entire row
 to a new data block, assuming the entire row can fit in a new block.  Oracle
 preserves the original row piece of a migrated row to point to the new block
 containing the migrated row: the rowid of a migrated row does not change.