alter table move的用途

来源:互联网 发布:python set函数 编辑:程序博客网 时间:2024/05/17 03:07

降低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

原创粉丝点击