Oracle Database 12c Advanced Compression For SAP Systems
Oracle Database 12c Advanced Compression For SAP Systems
Symptom
Rapid increase in data volumes have put enterprise IT infrastructures under severe pressure - from a cost,
performance, scalability, and manageability perspective. Efficient ways of storing and managing data are
needed to meet the growing demands of large systems. Database compression is an important technique to
reduce storage needs.
Other Terms
compression, oltp table compression, advanced index compression, securefile, securefile compression,
rman, rman backup compression, standby database, data guard network compression, advanced
compression option, disk space, network compression
The following prerequisites have to be met to use the advanced compression features of Oracle Database
12c:
Solution
Compressed IOTs do not belong to the advanced compression features of ACO. You can use this Oracle
standard compression feature without an ACO license.
Compressed IOTs can be used for tables with a single unique index reducing the amount of disk space.
Details on compressed IOTs with a description of all benefits are described in SAP note 1856270.
The Oracle Advanced Compression Option (ACO) of Oracle Database 12c is supported for all SAP systems
from 7.0 on. Oracle 12c ACO contains the following features:
Advanced Row Compression compresses data by eliminating duplicate values in a database block.
Compressed data stored in a database block is self-contained. That is, all the information needed to re-create
the uncompressed data in a block is available within that block. Duplicate values in all the rows and columns
in a block are stored once at the beginning of the block, in what is called a symbol table for that block. All
occurrences of such values are replaced with a short reference to the symbol table.
Advanced Row Compression allows data to be compressed during all types of data manipulation operations,
including conventional DML such as INSERT and UPDATE.
Restrictions:
1. Compression is not applied to lob segments (lob segments can be compressed by using SecureFile
compression which is described later in this note).
2. Advanced Row Compression of tables with LONG and LONG RAW columns is NOT supported. Please
convert LONG and LONG RAW columns to SecureFile LOBs to use compression.
3. Only user tables in user tablespaces can be compressed. Oracle system tables (tables in tablespaces
SYSTEM or SYSAUX) cannot be compressed.
This alter statement can be used for an existing table in the database. Only new inserted data will be
compressed. Already existing data in the table will not be compressed. To compress existing data a table
New SAP installations from 7.00 on have an option in SAPINST to create oltp compressed tables during the
installation of an SAP system.
Advanced Index Compression reduces the size of an index substantially. Advanced Index Compression
works at the block level to provide the best compression for each block. Advanced Index Compression
provides better compression ratios than prefix compression (SAP Note 1109743) and is easier to use (no
prefix computation is needed). Advanced Index Compression can be specified during the creation, alter or
rebuild of an index.
Complete DDIC support of advanced index compression starts with the following support package:
SAP BRSPACE Release 7.40 PL17 or higher supports advanced index compression.
Note: Only Advanced Index Compression Low is supported. Advanced Compression High is not supported.
Network Data Compression reduces the size of data exchanged between database client (SAP Application
Server) and database server. In addition, compressed data uses less bandwidth which allows transmission of
larger data in less time which will improve query response times and large data loads.
Prerequisite: Both instant client and database server version have to be upgraded to minimum 12.1.0.2 to
use this feature
To enable Advance Network Compression the following parameter needs to be set in sqlnet.ora at both the
client and server side.
sqlnet.compression=on
Securefile Compression
SecureFiles Compression can be used to compress inline and out-of-line LOB data of SAP tables. To use
this feature existing LOB data needs to be stored as securefiles in the database. The migration (in online or
offline mode) of existing LOB data to compressed securefiles should be performed by BRSPACE.
• How to enable securefile compression for lob column FIELDINFO of table DNYPSOURCE
SQL> CREATE TABLE DYNPSOURCE (...) LOB (FIELDINFO) STORE AS SECUREFILE
(COMPRESS LOW);
• How to check for compressed securefiles:
SQL> SELECT table_name, column_name, securefile, compression FROM user_lobs;
TABLE_NAME COLUMN_NAME SEC COMPRE
------------- --------------- ----- --------
DYNPSOURCE FIELDINFO YES LOW
RMAN Compression
With RMAN Compression backup data is compressed before it is written to disk or tape and doesn't need to
be uncompressed before recovery - providing an enormous reduction in storage costs up to 5 times for
backups.
Data Guard network compression introduces the capability to compress redo data before it is sent over the
network to the standby database(s). Through this compression, network bandwidth is maximized to increase
network throughput. Redo transport can be up to two times faster with compression.
3. Migrate the n largest (100 < n < 500) SAP transparent tables (except queue type tables like VB or
RFC tables) or partitions to oltp compressed tables/partitions. Selecting the largest tables and/or
partitions provides sufficient space savings and good overall transaction throughput. (Remark:
SAPInst/SWPM provides the option to compress an entire tablespace. Although this provides an easy
way to compress all data in an tablespace it will decrease overall transaction throughput and is
therefore not recommended)
4. Migrate all LOBs of SAP tables (except cluster, pool and INDX tables) to compressed SecureFile
LOBs. Optimal transaction throughput in an SAP system is achieved by using the compression degree
LOW as this has the least CPU overhead and provides slightly lower compression ratios than the
compression degree MEDIUM. Therefore compression degree LOW is recommended for SecureFile
LOBs.
1. Create one or more new tablespaces with about 30% of the size of the original tablespaces.
2. Make sure to use the autoextend option for the datafiles of each tablespace. Please consider that
you have enough disk space in your filesystem(s) to allow enough space for about 50% of the original
database size.
4. After successfull completion of above three steps drop the old tablespaces
Remark: After a tablespace reorganization you will see a different number of records in DB02 for tables
created and segments created. This is OK as for empty tables no segments are created anymore (deferred
segment feature of Oracle 11g)
1. Database Size
The total database size is reduced by up to a factor of 3 (after a database reorganization) when using
advanced row, advanced index and securefile compression. A higher factor of 3 is achieved when
comparing the compressed database with the original, non reorganized database. In general R/3
databases will show a slighty smaller compression factor due to heavy use of cluster tables which are
already compressed by the SAP application. BW, CRM, XI or Portal databases have higher
compression factors as they contain none or only a few small cluster tables and store a lot of
information in out-of-line LOB data.
2. Reset storage parameters before compressing tables
Please make sure that your initial extent size of the table, index or partition to be compressed is reset
to the default value of 64KB. Otherwise with a larger initial extent size data will still be compressed but
you may not see the correct disk space savings as a lot of free space will be wasted in the initial extent.
As a best practice please use the -l option of brspace by using brspace -l 2.
3. Check uniform size of locally managed tablespaces
Please make sure that your uniform size is reduced substantially when storing the compressed tables,
indexes or partitions in a locally managed tablespace with uniform extent sizes enabled. Again with a
high uniform size setting you may not see the disk space savings with compression enabled.
4. Performance
Overall system throughput is not negatively impacted and may improve.
Should you experience very long runtimes (i.e. 5-10 times slower) for certain operations (like mass
inserts in BW PSA or ODS tables/partitions) then you should set the event 10447 level 50 in the
spfile/init.ora. This will reduce the overhead for insertion into compressed tables/partitions.
• Amount of redo data generated can be up to 30% higher
• Up to 70% less physical reads from the database
• Up to 5% less physical writes to the database
• Up to 15% improvement in database buffer hit rate
• No impact on cpu utilization for regular transaction workload.
Specific operations such as R3load imports (when not using the loadprocedure fast option) or
client copies may run slower.
1914631 Central Technical Note for Oracle Database 12c Release 1 (12.1)
1914631 Central Technical Note for Oracle Database 12c Release 1 (12.1)