比较Oracle中的alter table t move和alter table t shrink space(三)

2014-11-24 07:39:12 · 作者: · 浏览: 18

----------
1

tony@ORA11GR2> alter table t enable row movement;

Table altered.

tony@ORA11GR2> alter table t shrink space;

Table altered.

tony@ORA11GR2> delete from chained_rows;

1 row deleted.

tony@ORA11GR2> analyze table t list chained rows;

Table analyzed.

tony@ORA11GR2> select count(*) from chained_rows;

COUNT(*)
----------
0

tony@ORA11GR2> update t set y = rpad('*',2000,'*') where x = 2;

1 row updated.

tony@ORA11GR2> analyze table t list chained rows;

Table analyzed.

tony@ORA11GR2> select count(*) from chained_rows;

COUNT(*)
----------
1

tony@ORA11GR2> alter table t move;

Table altered.

tony@ORA11GR2> delete from chained_rows;

1 row deleted.

tony@ORA11GR2> analyze table t list chained rows;

Table analyzed.

tony@ORA11GR2> select count(*) from chained_rows;

COUNT(*)
----------
0


摘自 NowOrNever