oracle分区表迁移后空间占用增大

时间:2024-04-15 07:22:53

检查分区段隐含参数:

select a.KSPPINM "Parameter", c.ksppstvl "Instance Value", ksppdesc "Desc"
from sys.x$ksppi a, sys.x$ksppcv b, sys.x$ksppsv c
where a.indx = b.indx and a.indx = c.indx
and substr(ksppinm,1,1)='_'
and a.ksppinm in ('_partition_large_extents');

Parameter               Instance Value        Desc
------------------------------ -------------------- ----------------------------------------------------------------------
_partition_large_extents       TRUE            Enables large extent allocation for partitioned tables

可以把隐含参数_partition_large_extents、_index_partition_large_extents设置成false的话能够节约空间。

检查分区表segment和extent:
select * from dba_segments where segment_name in('PARTITION_TABLE','T');
select * from dba_extents where segment_name in('PARTITION_TABLE','T');

主要是定义的分区init_extent大小不一样导致,默认是64k,这里定义了8M导致表空间占用增大了

参考文档:Initial Extent Size of a Partition Changed to 8MB from 64KB After Upgrade to 11.2.0.2 or Later (Doc ID 1295484.1)