2020年11月24日 星期二

Oracle Row Chaining and Migration 圖示

 

The Secrets of Oracle Row Chaining and Migration

https://www.akadia.com/services/ora_chained_rows.html



Row Migration

We will migrate a row when an update to that row would cause it to not fit on the block anymore (with all of the other data that exists there currently).  A migration means that the entire row will move and we just leave behind the «forwarding address». So, the original block just has the rowid of the new block and the entire row is moved.






Row Chaining

A row is too large to fit into a single database 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 rowsize 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. So, instead of just having a forwarding address on one block and the data on another we have data on two or more blocks.





"alter table move tablespace" tips

http://www.dba-oracle.com/t_alter_table_move_index_constraint.htm


reorg


Identifying Oracle Tables with Migrated/Chained Rows

http://www.dba-oracle.com/t_identify_chained_rows.htm


資料鏈結(Chained Row)有兩種型態
http://dbtim.blogspot.com/2016/05/1-3.html


可用TOAD Rebuild Table 或是 Repair Chained Rows (好用)來做 優化


analyze table TableName compute statistics;

沒有留言:

張貼留言