Row Migration and Row Chaining(行迁移和行链接)
Row Migration(行迁移)
当记录被更新时,原数据块无法容纳新的数据时,新的更新数据将迁移到别的数据块中,而原数据块的记录保留并指向被迁移的数据块。
Row Chaining(行链接)
(1)当行记录大于数据块的大小时,一个数据块将无法容纳,这时候,将加入新的数据块直到能容纳全部数据,数据块之间就有链接关系。
(2)当表的定义超过255个字段时,将产生块内部的链接。
v$sysstat and v$sesstat
The idea is to check the statistic that gives the number of fetches that read more than one row piece (including intra-block chained rows), namely, [table fetch continued row].
this statistic could also be compared with [table scan rows gotten] and [table fetch by rowid].
select avg_row_len from dba_tables
ANALYZE TABLE LIST CHAINED ROWS
select * from chained_rows;
Row Migration解决方法:
1. 防止产生Row Migration:
增大pctfree
2. 清除Row Migration:
ALTER TABLE MOVE
或
将行迁移的数据导入临时表,然后再导入
Row Chaining解决方法:
1. 对于块内部的链接,减少表的字段,或将很少使用的字段放到后面;
2. 对于块外部的链接,重新设计表,或增大数据块的块大小(Block size 2K, 4K, 8K, 16K, 32K)
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/13605188/viewspace-620328/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/13605188/viewspace-620328/
本文探讨了数据库中行迁移和行链接的概念及其解决方法。行迁移是指当更新后的记录无法放入原始数据块时,部分数据会被迁移到其他数据块。行链接则涉及单条记录跨越多个数据块的情况。文章还提供了如何通过调整表结构和参数设置来缓解这些问题的建议。

4596

被折叠的 条评论
为什么被折叠?



