Chained and Migrated Rows

Oracle Database must manage rows that are too large to fit into a single block. The following situations are possible:

  • The row is too large to fit into one data block when it is first inserted.

    In row chaining, Oracle Database stores the data for the row in a chain of one or more data blocks reserved for the segment. Row chaining most often occurs with large rows. Examples include rows that contain a column of data type LONG or LONG RAW, a VARCHAR2(4000) column in a 2 KB block, or a row with a huge number of columns. Row chaining in these cases is unavoidable.

     

  • A row that originally fit into one data block is updated so that the overall row length increases, but insufficient free space exists to hold the updated row.

    In row migration, Oracle Database moves the entire row to a new data block, assuming the row can fit in a new block. The original row piece of a migrated row contains a pointer or "forwarding address" to the new block containing the migrated row. The rowid of a migrated row does not change.

     

  • A row has more than 255 columns.

    Oracle Database can only store 255 columns in a row piece. Thus, if you insert a row into a table that has 1000 columns, then the database creates 4 row pieces, typically chained over multiple blocks.

posted @ 2015-07-14 16:25  cnmarkao  阅读(188)  评论(0编辑  收藏  举报