分类: Oracle
2012-05-25 17:05:53
Row migration is typically caused by UPDATE operation
Row chaining is typically caused by INSERT operation.
SQL statements which are creating/querying these chained/migrated rows will degrade the performance due to more I/O work.
To diagnose chained/migrated rows use ANALYZE command , query V$SYSSTAT view
To remove chained/migrated rows use higher PCTFREE using ALTER TABLE MOVE.
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:
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 INVALID_ROWS table which is created by the utlvalid.sql script (in $ORACLE_HOME/rdbms/admin).
SELECT * FROM chained_rows;