Compressing Infocubes

8 Oct

An InfoCube is loaded request by request, i.e request ids are created for each request, which is included in  ‘Data Package’ dimension in infocube.

Advantages of request ID’s are :

1) It makes  possible to pay particular attention to individual requests.

2) You can subsequently delete complete requests from the InfoCube.

Disadvantage of  Request Id is that same data record (where all characteristics are the same except the request ID)  appear more than once in the fact table. This unnecessarily increases the volume of data and affects system performance when you analyze data, since each time you execute a query, the system has to perform aggregation using the request ID.

What happens when we compress InfoCube? :

1) When the InfoCube is compressed the request Ids are deleted.

After compression the data cannot be deleted by request Id’s.

Data before compression :

Data after compression:

2) When infocube is compressed the data moves from F fact table to E fact table.

The F-table uses b-tree indexes the E-Table uses bitmap indexes. Index, Primary Index (The primary index is created automatically when the table is created in the database.).  Secondary Index (usually abap tables), Bitmap Index(Bitmap indexes are created by default on each dimension column of a fact table), and B-Tree Index.

When you load a data target, say a cube, the data is stored in the F fact table. If the cube is compressed, the data in the F fact table is transferred to the E fact table.

The data in the E fact table is compressed and occupies lesser space than F fact table.

3) During compression, the  records having everything same but different request Id’s are summarized.

 

4) Zero elimination :

Compression also does “Zero Elimination”. Zero Elimination means deleting the record from the cube after compression if and only if, the entire key figures of the particular record is zero. If there are two key figures A & B, A = 0, B = 10, then this record will not be deleted from the cube.

 

So in short Compression :

1) Removes redundant data by grouping on dimensions and aggregating key  figures, so helps in query performance.
2) Deletes request Id’s
3) Moves data from F fact table to E fact table which is smaller and has better performance                                                                                 4) Deletes t he record from the cubeif and only if, the entire key figures of the particular record is zero.

Leave a comment