Oracle shrink space 释放空间
1. 查询表空间中表对应的大小,好确定对哪张表进行操作
select * from dba_segments where tablespace_name='TBS_S05 ' and segment_type in ('TABLE','TABLE PARTITION');
2. 允许表进行行移动 (某些表不能进行truncate,只能delete)
alter table TBL_ETCGANTRYPICWASTE enable row movement;
3. 对表进行高水位线回收
--普通表
alter table TBL_ETCGANTRYPICWASTE shrink space cascade;
--分区表
alter table TBL_ETCGANTRYPICWASTE modify partition SYS886 shrink space cascade;
4. 取消表行移动
alter table TBL_ETCGANTRYPICWASTE disable row movement;
5. 更新统计信息
analyze table TBL_ETCGANTRYPICWASTE compute statistics;