Chained row

From Oracle FAQ
Jump to: navigation, search

A chained row is a row that is too large to fit into a single database data block.

For example, if you use a 4KB blocksize for your database, and you need to insert a row of 8KB into it, Oracle will use 3 blocks and store the row in pieces.

Some conditions that will cause row chaining are:

  • Tables whose row size exceeds the blocksize
  • Tables with long and long raw columns are prone to having chained rows
  • Tables with more then 255 columns will have chained rows as Oracle break wide tables up into pieces.

Detecting row chaining[edit]

This query will show how many chained (and migrated) rows each table has:

SELECT owner, table_name, chain_cnt FROM dba_tables WHERE chain_cnt > 0;

To see which rows are chained:

ANALYZE TABLE tablename LIST CHAINED ROWS;

This will put the rows into the CHAINED_ROWS table which is created by the utlchain.sql script (in $ORACLE_HOME/rdbms/admin).

SELECT * FROM chained_rows;

Also see[edit]

Glossary of Terms
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z #