行鏈接:
1. 一條記錄的大小大于block size,則產生行鏈接
2. 容易發生在比較大的行上
3. 因為行鏈接是由db_block_size不夠大引起的,所以對已有的行鏈接是無法清除的
4. 9i以后,可以對不同的表空間設置不同的db_block_size,可以將一些特殊的寬表放在大block size的表空間
例子:
表空間block size為8k(8192),因為數據塊頭也要占一定空間,所以如下例,實際只能放7948的數據,一旦超過,就產生行鏈接
--無
create table test7948(a char(2000),b char(2000),c char(2000),d char(1948))
tablespace test;
insert into test7948 values('a','b','c','d');
commit;
--有
create table test7949(a char(2000),b char(2000),c char(2000),d char(1949))
tablespace test;
insert into test7949 values('a','b','c','d');
commit;
行遷移:1. 本來是放的下的
2. 因為更新使row size變大了,一個block里又不足以放下增加的空間(PCTFREE相關),則產生行遷移
3. 容易發生在PCTFREE較小,對類似varchar類型的update又很多的表上
4. 無法避免,但通過把數據導出導入進行清除
例子:
--無
create table test7948_vchar(a char(2000),b char(2000),c char(2000),d char(1940), e varchar(9))
tablespace test;
insert into test7948_vchar values('a','b','c','d','12345678');
commit;
一更新,使得row size大于7948了,產生行遷移
--有
update test7948_vchar set e='123456789'
posted on 2010-06-13 14:08
Jcat 閱讀(235)
評論(0) 編輯 收藏 所屬分類:
Database