0% found this document useful (0 votes)
3 views6 pages

Oracle Database 12c Advanced Compression For SAP Systems

The document provides information on Oracle Database 12c Advanced Compression for SAP Systems, detailing its features, prerequisites, and benefits for managing large data volumes efficiently. It outlines various compression techniques, including Advanced Row Compression, Advanced Index Compression, and Securefile Compression, along with guidelines for implementation and customer experiences. The document emphasizes the importance of compression in reducing storage needs and improving performance in enterprise IT infrastructures.

Uploaded by

sandeepfromooty
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views6 pages

Oracle Database 12c Advanced Compression For SAP Systems

The document provides information on Oracle Database 12c Advanced Compression for SAP Systems, detailing its features, prerequisites, and benefits for managing large data volumes efficiently. It outlines various compression techniques, including Advanced Row Compression, Advanced Index Compression, and Securefile Compression, along with guidelines for implementation and customer experiences. The document emphasizes the importance of compression in reducing storage needs and improving performance in enterprise IT infrastructures.

Uploaded by

sandeepfromooty
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

2019-06-07 2138262

2138262 - Oracle Database 12c Advanced Compression


for SAP Systems
Version 8 Type SAP Note
Language English Master Language English
Priority Correction with medium priority Category Release planning information
Release Status Released for Customer Released On 29.05.2019
Component BC-DB-ORA ( Oracle )

Please find the original document at https://launchpad.support.sap.com/#/notes/ 2138262

Symptom

Data Compression and Efficient Storing Techniques

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

Reason and Prerequisites

The following prerequisites have to be met to use the advanced compression features of Oracle Database
12c:

• Oracle Database Release 12.1.0.2 or higher


• UNIX: SAP Bundle Patch 12102x_date ( date >= 201511 )
Windows: WIN 12.1.0.2.nP ( n >= 10 )
• Advanced Compression Option (ACO)
Customers who acquired the Oracle license directly from Oracle need to purchase this extra option
• SAP NetWeaver 7.0 and higher (ABAP stack/Java stack /Dual stack)
• SAP NetWeaver Application Server ABAP
• SAP NetWeaver Application Server Java
• SAP NetWeaver Application Server (ABAP, Java)
• Complete DDIC support of compression attributes (except advanced index compression) starts with the
following support packages:
• SAP_BASIS 7.00 SP21
• SAP_BASIS 7.01 SP06
• SAP_BASIS 7.02 SP02
• SAP BASIS 7.10 SP10
• SAP BASIS 7.11 SP05
• Minimum SAP BR*Tools Release 7.40 Patch 14

Solution

© 2019 SAP SE or an SAP affiliate company. All rights reserved 1 of 6


2019-06-07 2138262

Compressed Index Organized Table (IOT)

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.

Advanced Compression Features

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:

1. Advanced Row Compression


2. Advanced Index Compression
3. Securefile compression
4. Advanced Network Compression
5. Recovery Manager (RMAN) Compression
6. Data Guard Network Compression

Advanced Row Compression

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.

These operations include:

1. OCI Direct path (used by R3load for example)


2. CREATE TABLE and AS SELECT statements (used by all SAP applications)
3. Parallel DML statements (used by SAP BW for example)
4. Single-row or array inserts (used by all SAP applications)
5. Single-row or array updates (used by all SAP applications)

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.

Example on how to use and check for oltp compressed tables:

• How to enable advanced row compression for table COEP


SQL> CREATE TABLE COEP (...) ROW STORE COMPRESS ADVANCED;
SQL> ALTER TABLE COEP (...) ROW STORE COMPRESS ADVANCED;

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

© 2019 SAP SE or an SAP affiliate company. All rights reserved 2 of 6


2019-06-07 2138262

reorg should be performed by BRSPACE.

New SAP installations from 7.00 on have an option in SAPINST to create oltp compressed tables during the
installation of an SAP system.

• How to check for oltp compressed tables:


SQL> SELECT table_name, compression, compress_for FROM user_tables;
TABLE_NAME COMPRESS COMPRESS_FOR
------------- ----------- -------------
COEP ENABLED ADVANCED ROW

Advanced Index Compression

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.

By setting the init.ora parameter _advanced_index_compression_options=16 all newly created indexes by


default will be compressed. Therefore you do not have to specify the compressed advanced low clause as it
will be automatically added by the database.

Example on how to use Advanced Index Compression

• How to create index LIPS~0 as an advanced compressed index


SQL> CREATE UNIQUE INDEX "LIPS~0" on LIPS (...) COMPRESS ADVANCED LOW;
• How to rebuilt index BSIS~0 as an advanced compressed index
SQL> ALTER INDEX "BSIS~0" REBUILD ONLINE COMPRESS ADVANCED LOW;
• How to check for advanced compressed indexes:
SQL> SELECT index_name, compression FROM user_indexes;
INDEX_NAME COMPRESSION
------------- ----------- --------
LIPS~0 ADVANCED LOW

Complete DDIC support of advanced index compression starts with the following support package:

• SAP_BASIS 7.40 SP12

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.

Advanced Network Compression

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.

© 2019 SAP SE or an SAP affiliate company. All rights reserved 3 of 6


2019-06-07 2138262

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.

Examples on how to use and check for compressed securefiles:

• 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

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.

Guidelines on how to implement Oracle 12c Advanced Compression

1. Start with Compressed IOTs for the n largest tables (100<n<500)

2. Set _advanced_index_compression_options=16 in your init.ora or use Advanced Index


Compression for the n largest indexes (100<n<500)

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.

© 2019 SAP SE or an SAP affiliate company. All rights reserved 4 of 6


2019-06-07 2138262

Guideline on how to reclaim filesystem space

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.

3. Perform a tablespace reorganization into the new tablespace(s) with BRSPACE.

4. After successfull completion of above three steps drop the old tablespaces

5. Rename the new tablespaces

All these steps can be accomplished with BRSPACE.

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)

Customer experiences and results with Advanced Compression

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.

© 2019 SAP SE or an SAP affiliate company. All rights reserved 5 of 6


2019-06-07 2138262

Specific operations such as R3load imports (when not using the loadprocedure fast option) or
client copies may run slower.

This document refers to

SAP Note/KBA Title

2157904 Oracle 12c and higher: Conversion of compressed tables

2087004 BR*Tools support for Oracle 12.1

1922200 TUNING INSERT PERFORMANCE ON TABLE TST03

1914631 Central Technical Note for Oracle Database 12c Release 1 (12.1)

1856270 Performance improvements for tables with single unique index

1109743 Use of Index Key (Prefix) Compression for Oracle Databases

This document is referenced by

SAP Note/KBA Title

1590515 SAP Software and Oracle Exadata

1289494 FAQ: Oracle compression

334224 Important notes for creating indexes

1914631 Central Technical Note for Oracle Database 12c Release 1 (12.1)

2290084 SAP Software and Oracle Database Appliance Version 12.1

© 2019 SAP SE or an SAP affiliate company. All rights reserved 6 of 6

You might also like