--查看表空间碎片量
select a.tablespace_name ,count(1)
from dba_free_space a,dba_tablespaces b
where a.tablespace_name =b.tablespace_name
and b.extent_management = 'LOCAL'
groupby a.tablespace_name
havingcount(1)>20
orderby 2
--整理碎片
altertablespace tablespace_name coalesce;