oracle 移动高水位:

来源:互联网 发布:手机淘宝6.0.0旧版本 编辑:程序博客网 时间:2024/05/16 23:50

查看表的大小;
select a.blocks,a.bytes,a.bytes/1024/1024 from user_segments a
where a.segment_name='B_M_DZYH_CUST_SIGN_FACT';

 

首先

create table TEST_1228 as select * from user_tables;

insert into TEST_1228  select * from TEST_1228 ;

insert into TEST_1228  select * from TEST_1228 ;

insert into TEST_1228  select * from TEST_1228 ;

insert into TEST_1228  select * from TEST_1228 ;

insert into TEST_1228  select * from TEST_1228 ;

commit;

查看表的空间大小:记录为1

select a.blocks,a.bytes,a.bytes/1024/1024 from dba_segments a
where a.segment_name='TEST_1228'

删除表

delete from TEST_1228 ;

commit;

 

查看表的空间大小:记录为2

select a.blocks,a.bytes,a.bytes/1024/1024 from dba_segments a
where a.segment_name='TEST_1228'

移动高水位:

alter table TEST_1228 enable row movement
alter table TEST_1228 shrink space

 

查看表的空间大小:记录为3

select a.blocks,a.bytes,a.bytes/1024/1024 from dba_segments a
where a.segment_name='TEST_1228'

 

对比1,2,3结果,即可

原创粉丝点击