1. COMPRESSION Overview
Table compression was introduced in Oracle9i as a space saving feature.
The compression clause can be specified at the tablespace, table or partition level with the following options:
- NOCOMPRESS : The table or partition is not compressed(Default)
- COMPRESS : Compression is enabled on the table or partition during direct-path inserts only.
- COMPRESS FOR DIRECT_LOAD OPERATIONS : This option has the same affect as the simple COMPRESS keyword.
- COMPRESS FOR ALL OPERATIONS : As the name implies, this option enables compression for all operations, including regular DML statements.
This option requires the COMPATIBLE initialization parameter to be set to 11.1.0 or higher.
In 11gR2 this option has been renamed to COMPRESS FOR OLTP and the original name has been deprecated.
This option is also called Oracle Advanced Compression.
You could check which option is enabled on object(Table/Partition/Tablespace) by following query.
SQL> SELECT owner,table_name, compression, compress_for FROM dba_tables;
SQL> SELECT table_owner,table_name, partition_name, compression, compress_for FROM dba_tab_partitions;
SQL> SELECT tablespace_name,DEF_TAB_COMPRESSION,COMPRESS_FOR FROM dba_tablespaces;
2. SharePlex support for Oracle COMPRESSION
As of 7.6, SharePlex now supports changes to tables and LOBs with a COMPRESS options.
Officially, SharePlex supports all of compress options on 11gR2 except Hybrid Columnar Compression which will be supported in 8.0.x.
SecureFile LOBs are supported as long as their storage specifications do not include compression, encryption or deduplication and as long as logging is enabled.
# Support Table Compression:
Direct load compression: SharePlex now supports the replication of any table where the COMPRESS option was set during Create table, Alter table, Create tablespace, or Alter tablespace.
Also, SharePlex supports the replication of any table with a LOB column that is stored in a tablespace that compresses by default.
OLTP Compression: For Oracle 11g SharePlex now supports the replication of any table where the COMPRESS FOR OLTP or the COMPRESS FOR ALL OPERATIONS options was set during Create table, Alter table, Create tablespace, or Alter tablespace.
Also, SharePlex supports the replication of any table with a LOB column that is stored in a tablespace that compresses for OLTP by default.
Note: There is a bug in Oracle 11gR1 for key column updates of a compressed table.
The before image is missing from the redo log information. Therefore, SharePlex cannot replicate key column updates of compressed tables in 11gR1.
Hybrid Columnar Compression: SharePlex will NOT support the replication of tables where one of the following compression options were specified on the table, or on the tablespace:
COMPRESS FOR QUERY [ HIGH | LOW ]
COMPRESS FOR ARCHIVE [ HIGH | LOW ]
# Non-Supported Oracle Advanced Compression
Compressed SecureFile LOBs
Hybrid Columnar Compression