alter table move

[原文]:http://blog.csdn.net/wayne_lau/archive/2005/09/20/485340.aspx

降低HWM,消除行移植和行链接。

我们可以用下面的办法来最方便的进行重组,消除row migration: 

SQL> alter table t add t1 date default sysdate; 

Table altered. 

SQL> c/t1/t2 
1* alter table t add t2 date default sysdate 
SQL> / 

Table altered. 

SQL> c/t2/t3 
1* alter table t add t3 date default sysdate 
SQL> / 

Table altered. 

SQL> analyze table t compute statistics; 

Table analyzed. 

SQL> select table_name,num_rows,CHAIN_CNT from user_tables where table_name='T'; 

TABLE_NAME NUM_ROWS CHAIN_CNT 
------------------------------ ---------- ---------- 
T 41616 3908 

SQL> alter table t move ; 

Table altered. 

SQL> analyze table t compute statistics; 

Table analyzed. 

SQL> select table_name,num_rows,CHAIN_CNT from user_tables where table_name='T'; 

TABLE_NAME NUM_ROWS CHAIN_CNT 
------------------------------ ---------- ---------- 
T 41616 0

原文地址:https://www.cnblogs.com/ungshow/p/1446351.html