Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

table much bigger after compression?

User_5OAFPMar 20 2014 — edited Mar 20 2014

I had a partitioned table and wanted to compress it in basic mode. For every partition I did alter table move partition compress, computed statistics and the number of blocks after compression is much bigger than before compression. Why is that? Below is the code I run for my test. I would appreciate explanation, I expected smaller size. Is there anything I misinterpret or overlooked? Oracle 11.2.0.4.0

Thank you

create table x partition by hash (col) ( partition x1, partition x2, partition x3, partition x4 ) as

select level col from dual connect by level <= 100000;

begin

dbms_stats.gather_table_stats('oracle', 'x', degree => 4);

end;

select table_name, sum(blocks)

from user_tab_partitions

where table_name in ('X')

group by table_name;

TABLE_NAMESUM(BLOCKS)
X385

alter table x move partition x1 compress parallel 4;

alter table x move partition x2 compress parallel 4;

alter table x move partition x3 compress parallel 4;

alter table x move partition x4 compress parallel 4;

begin

dbms_stats.gather_table_stats('oracle', 'x', degree => 4);

end;

select table_name, sum(blocks)

from user_tab_partitions

where table_name in ('X')

group by table_name;

TABLE_NAMESUM(BLOCKS)
X16384
This post has been answered by jgarry on Mar 20 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 17 2014
Added on Mar 20 2014
10 comments
599 views