My Oracle Support Banner

Insert Data Is Slower With A Compressed Table In A Not Typical OLTP Environment (Doc ID 1353467.1)

Last updated on FEBRUARY 25, 2019

Applies to:

Oracle Database - Enterprise Edition - Version 11.1.0.6 to 11.2.0.2 [Release 11.1 to 11.2]
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Information in this document applies to any platform.

Symptoms

If inserting data in a compressed table, then this is slower than when inserting data in a no compressed table.

For example:

---- source table

create table abc
as select * from dba_objects;


---- destination tables
---- no compressed

create table cde
as select * from dba_objects where 1=2;


---- compressed

create table efg
compress for all operations
as select * from dba_objects where 1=2;


---- test1

set timing on


---- non compressed table

insert into cde
select * from abc;

260547 rows created.

Elapsed: 00:00:01.47


---- compressed table

insert into efg
select * from abc;

260547 rows created.

Elapsed: 00:00:07.38


########################################
-- test 2
-- non compressed table

begin
for i in 1..10000 loop
insert into cde
select * from abc where rownum < 100;
end loop;
end;
/

PL/SQL procedure successfully completed.

Elapsed: 00:00:02.35


-- compressed table

begin
for i in 1..10000 loop
insert into efg
select * from abc where rownum < 100;
end loop;
end;
/
Elapsed: 00:00:58.61


###########################################
---- test 3

create table gh1
as select * from dba_objects where rownum < 50;


---- non compressed table

begin
for i in 1..10000 loop
insert into cde
select * from gh1;
end loop;
end;
/

PL/SQL procedure successfully completed.

Elapsed: 00:00:01.66


---- compressed table

begin
for i in 1..10000 loop
insert into efg
select * from gh1;
end loop;
end;
/

Elapsed: 00:00:29.83.

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.