今天查询数据库表使用情况,发现一张无用的表,占60G,查询语句如下。
select segment_name,sum(bytes)/1024/1024/1024 from dba_segments
where owner='TEST' group by segment_name
order by 2 desc
truncate table后,再通过以上查询空间没有释放,做以下操作就好了
alter table table_name enable row movement;
alter TABLE table_name shrink SPACE;
alter table table_name DISABLE row movement;
select segment_name,sum(bytes)/1024/1024/1024 from dba_segments
where owner='TEST' group by segment_name
order by 2 desc
truncate table后,再通过以上查询空间没有释放,做以下操作就好了
alter table table_name enable row movement;
alter TABLE table_name shrink SPACE;
alter table table_name DISABLE row movement;